From 76c4bc925d2692eb0e258c35f6fdce0b183fb373 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Tue, 26 May 2020 16:19:05 +1000 Subject: [PATCH] DEV: followup to prev commit 337bd9a0f7616414 did not account for optimized image being nil --- app/models/topic_thumbnail.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(