From a2d70afeca051a81c57cd0a1381278cd81823845 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Fri, 4 Oct 2019 15:59:22 +0200 Subject: [PATCH] Improve missing files handling when clonning TinyMceAsset [SCI-3950] --- app/models/concerns/tiny_mce_images.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/tiny_mce_images.rb b/app/models/concerns/tiny_mce_images.rb index 585673bf1..c13d455c1 100644 --- a/app/models/concerns/tiny_mce_images.rb +++ b/app/models/concerns/tiny_mce_images.rb @@ -65,7 +65,7 @@ module TinyMceImages def clone_tinymce_assets(target, team) cloned_img_ids = [] tiny_mce_assets.each do |tiny_img| - next unless tiny_img.image.service.exist?(tiny_img.image.blob.key) + next unless tiny_img.image.attached? && tiny_img.image.service.exist?(tiny_img.image.blob.key) tiny_img_clone = TinyMceAsset.create( estimated_size: tiny_img.estimated_size,