summaryrefslogtreecommitdiffstats
path: root/acf/model/node.lua
diff options
context:
space:
mode:
Diffstat (limited to 'acf/model/node.lua')
-rw-r--r--acf/model/node.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/acf/model/node.lua b/acf/model/node.lua
index 8028bcb..afc3e0f 100644
--- a/acf/model/node.lua
+++ b/acf/model/node.lua
@@ -114,10 +114,10 @@ function Collection:init(context, params)
function mt.valid_member(name) return true end
function mt.mmeta(name) return mt.meta.members end
- function mt.members() return mt.txn:get(mt.addr) or {} end
+ function mt.members() return mt.txn:get(mt.addr, 'table') or {} end
function mt.validate()
- if params.required and #mt.txn:get(mt.addr) == 0 then
+ if params.required and #mt.members() == 0 then
raise(mt.path, 'Collection cannot be empty')
end
end