summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aconf/model/init.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/aconf/model/init.lua b/aconf/model/init.lua
index bc401be..b5a496f 100644
--- a/aconf/model/init.lua
+++ b/aconf/model/init.lua
@@ -1,5 +1,5 @@
--[[
-Copyright (c) 2012-2016 Kaarle Ritvanen
+Copyright (c) 2012-2019 Kaarle Ritvanen
See LICENSE file for license details
--]]
@@ -308,7 +308,9 @@ function M.List:init(params) super(self, M.List):init(params, node.List) end
-- @fclass Set
M.Set = class(M.Collection)
function M.Set:init(params)
- if not params.widget and isinstance(params.type, M.Reference) then
+ if not params.widget and (
+ params.type.choice or isinstance(params.type, M.Reference)
+ ) then
params.widget = 'checkboxes'
end
super(self, M.Set):init(params, M.node.Set)