DEV: followup to prev commit

337bd9a0f7 did not account for optimized image being nil
This commit is contained in:
Sam Saffron 2020-05-26 16:19:05 +10:00
parent 337bd9a0f7
commit 76c4bc925d
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

@ -26,7 +26,7 @@ class TopicThumbnail < ActiveRecord::Base
upload_id: original.id,
max_width: max_width,
max_height: max_height,
optimized_image_id: optimized.id
optimized_image_id: optimized&.id
])
TopicThumbnail.find_by(