From 030694b7b1f76828eb9fb9d047d4a2f29ecaab74 Mon Sep 17 00:00:00 2001 From: l1231669 Date: Mon, 28 Aug 2017 21:54:54 +0200 Subject: [PATCH] Add code to check ID --- mediaserver/platformcode/controllers/html.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mediaserver/platformcode/controllers/html.py b/mediaserver/platformcode/controllers/html.py index 885a9d0e..0cc5f00b 100644 --- a/mediaserver/platformcode/controllers/html.py +++ b/mediaserver/platformcode/controllers/html.py @@ -677,16 +677,17 @@ class platform(Platformtools): if not "label" in c: continue # Obtenemos el valor - if not c["id"] in dict_values: - if not callback: - c["value"] = config.get_setting(c["id"], **kwargs) + if "id" in c: + if not c["id"] in dict_values: + if not callback: + c["value"] = config.get_setting(c["id"], **kwargs) + else: + c["value"] = c["default"] + + dict_values[c["id"]] = c["value"] + else: - c["value"] = c["default"] - - dict_values[c["id"]] = c["value"] - - else: - c["value"] = dict_values[c["id"]] + c["value"] = dict_values[c["id"]] # Translation if c['label'].startswith('@') and unicode(c['label'][1:]).isnumeric():