[Commotion-admin] [luci-commotion] Adding app categories in luci produces error (#441)

Seamus Tuohy notifications at github.com
Mon Nov 10 08:43:34 EST 2014


Looks like there was no expiration time set. Looks like a default expiration time, or a check for value submitted are in order.

See comments added to the code below.
luci-commotion repo: luasrc/model/cbi/commotion/app_settings.lua - 
The code starts on line 42 and skips chunks with ```...```
The error was found on line 51
```
--! ex_time_num.write
--! @brief Multiple the lifetime by the unit chosen to modify it to seconds.
function ex_time_num.write(self, section, value) -- takes the section and value passed by the browser
...
   local unit = ex_time_units:formvalue(section) -- the unit of time was set (I think it had a default)
...
	  if unit == unt then
		 value = tonumber(value) * num -- (Line 51)  Tries to compare a number to a nil value.
		 sets = true
	  end
...
```


---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/luci-commotion/issues/441#issuecomment-62385316
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20141110/fb3cfaa3/attachment.html>


More information about the Commotion-admin mailing list