From 0fee6cc7070c40a13c607d27d65a94ec0356905c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 8 Aug 2017 04:18:21 +0200 Subject: [PATCH] gluon-web-logging: remove uci:set() nil check simple-uci will now delete an option when nil is passed. --- .../luasrc/lib/gluon/web/model/admin/logging.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/package/gluon-web-logging/luasrc/lib/gluon/web/model/admin/logging.lua b/package/gluon-web-logging/luasrc/lib/gluon/web/model/admin/logging.lua index 6357fbf9..8c707c83 100644 --- a/package/gluon-web-logging/luasrc/lib/gluon/web/model/admin/logging.lua +++ b/package/gluon-web-logging/luasrc/lib/gluon/web/model/admin/logging.lua @@ -31,11 +31,7 @@ port.optional = true port.placeholder = 514 port.datatype = 'irange(1, 65535)' function port:write(data) - if data ~= nil then - uci:set('system', system, 'log_port', data) - else - uci:delete('system', system, 'log_port') - end + uci:set('system', system, 'log_port', data) end function f:write()