Skip to content

Commit

Permalink
fix more config.get() magic
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-wahl committed Jul 19, 2024
1 parent 2453182 commit 3dfe7af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3dfe7af

Please sign in to comment.