mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 03:56:43 +00:00
Only update theme if value provided (#5240)
- Handles case where null or invalid value provided
This commit is contained in:
parent
bd1689095d
commit
41167f22c9
@ -639,8 +639,12 @@ class AppearanceSelectView(RedirectView):
|
|||||||
user_theme = common_models.ColorTheme()
|
user_theme = common_models.ColorTheme()
|
||||||
user_theme.user = request.user
|
user_theme.user = request.user
|
||||||
|
|
||||||
user_theme.name = theme
|
if theme:
|
||||||
user_theme.save()
|
try:
|
||||||
|
user_theme.name = theme
|
||||||
|
user_theme.save()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
return redirect(reverse_lazy('settings'))
|
return redirect(reverse_lazy('settings'))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user