fix: avoid bug when checking current theme

this check is happening not only for classic views but API as well,
which doesn't really have a theme..  probably need a proper fix in
wuttaweb but this should be okay for now
This commit is contained in:
Lance Edgar 2024-08-09 10:11:38 -05:00
parent 0b8315fc78
commit 7e683dfc4a

View file

@ -459,8 +459,8 @@ def should_use_oruga(request):
supports (and therefore should use) Oruga + Vue 3 as opposed to
the default of Buefy + Vue 2.
"""
theme = request.registry.settings['tailbone.theme']
if 'butterball' in theme:
theme = request.registry.settings.get('tailbone.theme')
if theme and 'butterball' in theme:
return True
return False