uci:set_list: Delete option if the list is empty
authorKarl Palsson <karlp@remake.is>
Wed, 2 Sep 2015 11:24:29 +0000 (11:24 +0000)
committerKarl Palsson <karlp@remake.is>
Wed, 2 Sep 2015 15:27:55 +0000 (15:27 +0000)
commit879d9ff2b8f80b7c8e4adadf0702154d9ae932f4
tree7c133cb360fd5cd60b3d94529eaa81513eef9a70
parentf0083abed10e8a397ebe9e62801e3b5d536ba7b6
uci:set_list: Delete option if the list is empty

Allows lists fetched with get_list to be modified and simply passed back
to set_list. Explicitly calling set_list() with an empty list is clearly
requesting that there be zero list items, ie, deletion of the option
altogether.

Signed-off-by: Karl Palsson <karlp@remake.is>
modules/luci-base/luasrc/model/uci.lua
modules/luci-base/luasrc/model/uci.luadoc