Skip missing files when clonning TinyMceAsset [SCI-3950]

This commit is contained in:
Oleksii Kriuchykhin 2019-10-03 15:43:39 +02:00
parent afecc3fd0e
commit bab228e1df

View file

@ -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,