FIX: wizard fails to start when default_theme_id is -1

This commit is contained in:
Neil Lalonde 2020-05-26 16:08:35 -04:00
parent b1c726be0d
commit 2c880b9bf9
No known key found for this signature in database
GPG Key ID: FF871CA9037D0A91

View File

@ -14,7 +14,7 @@ class WizardSerializer < ApplicationSerializer
end end
def current_color_scheme def current_color_scheme
color_scheme = Theme.find(SiteSetting.default_theme_id).color_scheme color_scheme = Theme.where(id: SiteSetting.default_theme_id).first&.color_scheme
colors = color_scheme ? color_scheme.colors : ColorScheme.base_colors colors = color_scheme ? color_scheme.colors : ColorScheme.base_colors
# The frontend expects the color hexs to start with '#' # The frontend expects the color hexs to start with '#'