fix(process_image): sometimes last is nil 🤷♂️
This commit is contained in:
parent
ae7260829d
commit
ebf839f37b
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,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.any? { _1.record_type == "Export" }
|
||||||
return if !blob.content_type.in?(PROCESSABLE_TYPES)
|
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
|
return if blob.byte_size.zero? # some empty files may be considered as image depending on filename
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue