From bab228e1dfa30bfa58a0ac789bfd812e22f625c5 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 3 Oct 2019 15:43:39 +0200 Subject: [PATCH] Skip missing files when clonning TinyMceAsset [SCI-3950] --- app/models/concerns/tiny_mce_images.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/concerns/tiny_mce_images.rb b/app/models/concerns/tiny_mce_images.rb index 2c400d092..585673bf1 100644 --- a/app/models/concerns/tiny_mce_images.rb +++ b/app/models/concerns/tiny_mce_images.rb @@ -65,6 +65,8 @@ 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) + tiny_img_clone = TinyMceAsset.create( estimated_size: tiny_img.estimated_size, object: target,