fix: check if key present in settings before updating (#2306)

This commit is contained in:
Vlad Stan
2024-03-12 13:03:11 +00:00
committed by GitHub
parent 4c0bd132b1
commit 5b4398911a
+4 -1
View File
@@ -709,7 +709,10 @@ async def check_webpush_settings():
def update_cached_settings(sets_dict: dict): def update_cached_settings(sets_dict: dict):
for key, value in sets_dict.items(): for key, value in sets_dict.items():
if key not in readonly_variables: if key in readonly_variables:
continue
if key not in settings.dict().keys():
continue
try: try:
setattr(settings, key, value) setattr(settings, key, value)
except Exception: except Exception: