fix(image processing): handle case of blob without attachments

This commit is contained in:
Eric Leroy-Terquem 2024-10-24 10:13:34 +02:00
parent 69e1b1be41
commit e6845cd94d
No known key found for this signature in database
GPG key ID: 53D8FAECEF207605

View file

@ -18,7 +18,7 @@ module AttachmentImageProcessorConcern
def process_image def process_image
return if blob.nil? return if blob.nil?
return if blob.attachments.size > 1 return if blob.attachments.size != 1
return if blob.attachments.last.record_type == "Export" return if blob.attachments.last.record_type == "Export"
ImageProcessorJob.perform_later(blob) ImageProcessorJob.perform_later(blob)