avoid performing job if attachment is created on existed blob
This commit is contained in:
parent
affb1820d8
commit
7cfd9becc8
1 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,8 @@ module AttachmentImageProcessorConcern
|
|||
|
||||
def process_image
|
||||
return if blob.nil?
|
||||
return if blob.attachments.any? { _1.record_type == "Export" }
|
||||
return if blob.attachments.size > 1
|
||||
return if blob.attachments.last.record_type == "Export"
|
||||
|
||||
ImageProcessorJob.perform_later(blob)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue