From f0ccd85ac609d63eedd0721dbcbc2257665aefc1 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 4 Mar 2011 14:15:45 +0000 Subject: Fail to create / update device if no classes selected --- provisioning-model.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'provisioning-model.lua') 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() -- cgit v1.2.3