2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Extended error handling for get_user_color_theme (#8854)

This commit is contained in:
Oliver 2025-01-07 23:53:10 +11:00 committed by GitHub
parent 8576fbbade
commit 4b564929d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -463,7 +463,7 @@ def get_user_color_theme(user):
user_theme_name = user_theme.name user_theme_name = user_theme.name
if not user_theme_name or not ColorTheme.is_valid_choice(user_theme): if not user_theme_name or not ColorTheme.is_valid_choice(user_theme):
user_theme_name = 'default' user_theme_name = 'default'
except ColorTheme.DoesNotExist: except Exception:
user_theme_name = 'default' user_theme_name = 'default'
return user_theme_name return user_theme_name