mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Ignore missing uploads in theme settings (#13486)
In some rare cases, this could prevent the site from bootstrapping, because theme settings are invoked early in the application.
This commit is contained in:
@@ -527,7 +527,9 @@ class Theme < ActiveRecord::Base
|
||||
|
||||
theme_uploads = {}
|
||||
upload_fields.each do |field|
|
||||
theme_uploads[field.name] = Discourse.store.cdn_url(field.upload.url)
|
||||
if field.upload&.url
|
||||
theme_uploads[field.name] = Discourse.store.cdn_url(field.upload.url)
|
||||
end
|
||||
end
|
||||
hash['theme_uploads'] = theme_uploads if theme_uploads.present?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user