Skip to content
Snippets Groups Projects
Unverified Commit 9ece0daa authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-web: ListValue: convert keys to strings before adding to key list

Fixes validation of ListValues.

Fixes: ec532b95 "gluon-web: extend ListValue with optional and unset
values"
parent 273a60fe
No related branches found
No related tags found
No related merge requests found
......@@ -401,14 +401,16 @@ function ListValue:__init__(...)
end
function ListValue:value(key, val, ...)
key = tostring(key)
if self.keys[key] then
return
end
self.keys[key] = true
val = val or key
self.keys[key] = true
table.insert(self.entry_list, {
key = tostring(key),
key = key,
value = tostring(val),
deps = {...},
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment