diff options
Diffstat (limited to 'aconf/model')
-rw-r--r-- | aconf/model/model.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/aconf/model/model.lua b/aconf/model/model.lua index 4185500..e1b61bf 100644 --- a/aconf/model/model.lua +++ b/aconf/model/model.lua @@ -157,17 +157,17 @@ function M.Model:init(context) if options.create then return f and f:load(options) end return function(var) - if f then f:save(var) - elseif var ~= nil then - raise( - pth.join(mt.path, v.name), - 'Action does not accept an input argument' - ) - end - local res = v.func(self, f and f:load()) - if f then f:_save() end - return res - end + if f then f:save(var) + elseif var ~= nil then + raise( + pth.join(mt.path, v.name), + 'Action does not accept an input argument' + ) + end + local res = v.func(self, f and f:load()) + if f then f:_save() end + return res + end end return v |