Skip to content

Commit fbeca00

Browse files
committed
Add catch when logo resizing not working
1 parent 3c3bbc5 commit fbeca00

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/models/organization.rb

+3
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ def logo_path
9898
else
9999
'missing.png'
100100
end
101+
rescue ActiveStorage::InvariableError => e
102+
Rails.logger.error("Could not resize image for organization #{id}: #{e.message}")
103+
'missing.png'
101104
end
102105

103106
def org_logo

config/environments/production.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@
122122

123123
config.active_record.cache_versioning = false
124124
config.active_storage.variant_processor = :mini_magick
125-
end
125+
end

0 commit comments

Comments
 (0)