Skip to content

Commit

Permalink
Backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ssesselmann committed Dec 18, 2024
1 parent 12a9bd2 commit 3bcc8b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,13 @@ def load_settings_from_json(path):
else:
setattr(global_vars, key, value)

# Backwards compatibility for theme
if getattr(global_vars, "theme", "") not in ["light-theme", "dark-theme"]:
with global_vars.write_lock:
global_vars.theme = "light-theme"
logger.info("Theme setting is not valid, defaulting to 'light-mode'.")


logger.info(f'Load settings completed \n')
except Exception as e:
logger.error(f'Error loading settings from JSON: {e}')
Expand Down

0 comments on commit 3bcc8b6

Please sign in to comment.