diff --git a/src/api/app/helpers/webui/webui_helper.rb b/src/api/app/helpers/webui/webui_helper.rb index aae8fbc18fd..f6c72410d07 100644 --- a/src/api/app/helpers/webui/webui_helper.rb +++ b/src/api/app/helpers/webui/webui_helper.rb @@ -328,8 +328,9 @@ def valid_xml_id(rawid) end def theme_from_user - return "light" unless feature_enabled?("color_themes") - User.session&.color_theme || "system" + return 'light' unless feature_enabled?('color_themes') + + User.session&.color_theme || 'system' end end diff --git a/src/api/app/models/user.rb b/src/api/app/models/user.rb index 647f6503817..2741a952c30 100644 --- a/src/api/app/models/user.rb +++ b/src/api/app/models/user.rb @@ -123,7 +123,7 @@ class User < ApplicationRecord validates :password, confirmation: true, allow_blank: true validates :biography, length: { maximum: MAX_BIOGRAPHY_LENGTH_ALLOWED } validates :rss_secret, uniqueness: true, length: { maximum: 200 }, allow_blank: true - validates :color_theme, inclusion: { in: color_themes.keys }, if: -> { Flipper.enabled?("color_themes") } + validates :color_theme, inclusion: { in: color_themes.keys }, if: -> { Flipper.enabled?('color_themes') } after_create :create_home_project, :measure_create after_update :measure_delete