diff --git a/app/models/topic_thumbnail.rb b/app/models/topic_thumbnail.rb index ae8d17be8bc..f12161510f0 100644 --- a/app/models/topic_thumbnail.rb +++ b/app/models/topic_thumbnail.rb @@ -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(