summaryrefslogtreecommitdiffstats
path: root/provisioning-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2011-03-04 14:15:45 +0000
committerTed Trask <ttrask01@yahoo.com>2011-03-04 14:15:45 +0000
commitf0ccd85ac609d63eedd0721dbcbc2257665aefc1 (patch)
treeac5e5613fd9f67372b2f7ed21aacf759cccd240c /provisioning-model.lua
parent4506e528fafecf02decc914684d23139ec414191 (diff)
downloadacf-provisioning-f0ccd85ac609d63eedd0721dbcbc2257665aefc1.tar.bz2
acf-provisioning-f0ccd85ac609d63eedd0721dbcbc2257665aefc1.tar.xz
Fail to create / update device if no classes selected
Diffstat (limited to 'provisioning-model.lua')
-rw-r--r--provisioning-model.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/provisioning-model.lua b/provisioning-model.lua
index 8f2470a..0c29426 100644
--- a/provisioning-model.lua
+++ b/provisioning-model.lua
@@ -1193,8 +1193,13 @@ update_device = function(device, create)
local success = true
local errtxt
-- Validate the settings
+ local something = false
for n,c in pairs(device.value.classes.value) do
success = modelfunctions.validateselect(c) and success
+ if c.value ~= "" then something = true end
+ end
+ if not something then
+ success = false
end
if success then
local res, err = pcall(function()