Merge pull request #11030 from tchak/fix-image-processor-error
fix(process_image): sometimes last is nil 🤷♂️
This commit is contained in:
commit
bc7f39a053
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ module AttachmentImageProcessorConcern
|
|||
def process_image
|
||||
return if blob.nil?
|
||||
return if blob.attachments.size != 1
|
||||
return if blob.attachments.last.record_type == "Export"
|
||||
return if blob.attachments.any? { _1.record_type == "Export" }
|
||||
return if !blob.content_type.in?(PROCESSABLE_TYPES)
|
||||
return if blob.byte_size.zero? # some empty files may be considered as image depending on filename
|
||||
|
||||
|
|
Loading…
Reference in a new issue