Merge pull request #10984 from demarches-simplifiees/fix-image-processor-job-errors
Technique : gestion des cas d'erreurs de ImageProcessorJob
This commit is contained in:
commit
0e589fc7ad
3 changed files with 6 additions and 2 deletions
|
@ -18,8 +18,9 @@ module AttachmentImageProcessorConcern
|
|||
|
||||
def process_image
|
||||
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.content_type.in?(PROCESSABLE_TYPES)
|
||||
|
||||
ImageProcessorJob.perform_later(blob)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue