Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
- app/models/form/admin_settings.rb
- config/locales/ja.yml
This commit is contained in:
Thibaut Girka
2019-04-01 21:28:31 +02:00
33 changed files with 259 additions and 116 deletions

View File

@ -28,6 +28,9 @@ class Form::AdminSettings
profile_directory
hide_followers_count
flavour_and_skin
thumbnail
hero
mascot
).freeze
BOOLEAN_KEYS = %i(
@ -73,7 +76,7 @@ class Form::AdminSettings
next if PSEUDO_KEYS.include?(key)
value = instance_variable_get("@#{key}")
if UPLOAD_KEYS.include?(key)
if UPLOAD_KEYS.include?(key) && !value.nil?
upload = SiteUpload.where(var: key).first_or_initialize(var: key)
upload.update(file: value)
else