summaryrefslogtreecommitdiffstats
path: root/acf2/model/model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'acf2/model/model.lua')
-rw-r--r--acf2/model/model.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/acf2/model/model.lua b/acf2/model/model.lua
index 04d031a..7d026da 100644
--- a/acf2/model/model.lua
+++ b/acf2/model/model.lua
@@ -142,10 +142,7 @@ function M.Model:init(context)
local v = mt.class[k]
if isinstance(v, Field) then
- v = BoundMember(self, k, v)
- local res = v:load(options)
- if res == nil and v.compute then return v:compute() end
- return res
+ return BoundMember(self, k, v):load(options)
end
assert(mt.txn)
@@ -204,7 +201,7 @@ function M.Model:init(context)
function mt.validate()
for _, f in ipairs(_members(Field)) do
- if f.editable and not f.compute then
+ if f.editable then
if mt.match(f.condition or {}) then f:validate_saved()
else f:_save() end
end