From 3dfe7af292b33574a31630e3a0da10954ed87d0a Mon Sep 17 00:00:00 2001 From: Dale Wahl Date: Fri, 19 Jul 2024 11:52:31 +0200 Subject: [PATCH] fix more config.get() magic --- common/config_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/config_manager.py b/common/config_manager.py index 7c3bcf8cc..40bce67a6 100644 --- a/common/config_manager.py +++ b/common/config_manager.py @@ -292,8 +292,10 @@ def get(self, attribute_name, default=None, is_json=False, user=None, tags=None) final_settings[setting_name] = value - if attribute_name: + if attribute_name is not None and len(attribute_name) == 1: # Single attribute requests; provide only the highest priority result + # this works because attribute_name is converted to a tuple (else already returned) + # if attribute_name is None, return all settings # print(f"{user}: {attribute_name[0]} = {list(final_settings.values())[0]}") return list(final_settings.values())[0] else: