mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
FIX: missing theme upload should not break precompile process. (#18431)
Previously, if an active default theme's upload record went missing then it will break the site and cause downtime.
This commit is contained in:
@ -222,7 +222,7 @@ class Stylesheet::Manager::Builder
|
||||
sha1s = []
|
||||
|
||||
(theme&.upload_fields || []).map do |upload_field|
|
||||
sha1s << upload_field.upload.sha1
|
||||
sha1s << upload_field.upload&.sha1
|
||||
end
|
||||
|
||||
Digest::SHA1.hexdigest(sha1s.sort!.join("\n"))
|
||||
|
Reference in New Issue
Block a user