From e8c65ef75ffcb47e0914f8a004748383969af465 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 6 Jun 2020 17:23:09 +0200 Subject: [PATCH] gluon-web-model: fix conflicting table fields "reset" With 11a3b5661720 ("gluon-web-model: add dependency support for sections"), a "reset" function was added to all model nodes. This conflicts with the "reset" field of the Form object, making reset buttons show labels like "function: 0xbb8d50" and possibly breaking form processing when packages override the reset field. --- .../luasrc/usr/lib/lua/gluon/web/model/classes.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua b/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua index e75d12f0..07c9ef5e 100644 --- a/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua +++ b/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua @@ -72,9 +72,9 @@ function Node:id() return prefix.."."..self:id_suffix() end -function Node:reset() +function Node:reset_node() for _, child in ipairs(self.children) do - child:reset() + child:reset_node() end end @@ -154,7 +154,7 @@ function Node:resolve_node_depends() if valid then return false end end - self:reset() + self:reset_node() return true end @@ -206,7 +206,7 @@ function AbstractValue:cfgvalue() end end -function AbstractValue:reset() +function AbstractValue:reset_node() self.data = nil self.error = false self.state = M.FORM_NODATA