mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
- Handles case where null or invalid value provided (cherry picked from commit 41167f22c9943a2a0f389fd24f595f137bf2271f) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
6730098bac
commit
8a58bf5ffa
@ -640,8 +640,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