Set value to default one on pending reset

This commit is contained in:
shortcutme 2018-07-16 01:49:12 +02:00
parent d772280147
commit 30940fad2e
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 4 additions and 1 deletions

View File

@ -44,10 +44,13 @@ class UiWebsocketPlugin(object):
for key, val in config_values.iteritems(): for key, val in config_values.iteritems():
if key not in config.keys_api_change_allowed: if key not in config.keys_api_change_allowed:
continue continue
is_pending = key in config.pending_changes
if val == None and is_pending:
val = config.parser.get_default(key)
back[key] = { back[key] = {
"value": val, "value": val,
"default": config.parser.get_default(key), "default": config.parser.get_default(key),
"pending": key in config.pending_changes "pending": is_pending
} }
return back return back