summaryrefslogtreecommitdiffstats
path: root/provisioning-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'provisioning-model.lua')
-rw-r--r--provisioning-model.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/provisioning-model.lua b/provisioning-model.lua
index fd4c1e4..34f8572 100644
--- a/provisioning-model.lua
+++ b/provisioning-model.lua
@@ -1658,11 +1658,17 @@ mymodule.update_device = function(self, device, action, create)
end
end
+ device.descr = "Device Created"
+
-- Notify the device that its params might have changed (this will also validate)
local s = saved_device_params[device.value.device_id.value]
local r = set_device_params(get_device_params(device.value.device_id.value, false), false)
if r.errtxt then
- error(r:print_errtxt())
+ if create then
+ device.descr = device.descr.."\nERROR: Failed to update params\n"..r:print_errtxt()
+ else
+ error(r:print_errtxt())
+ end
end
callscript(updatedevicescriptfile, device, saved_devices[device.value.device_id.value], r, s)
@@ -1678,6 +1684,7 @@ mymodule.update_device = function(self, device, action, create)
end
end
if not success then
+ device.descr = nil
if create then
device.errtxt = errtxt or "Failed to create device"
else