mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-07 16:47:13 +00:00
fixup: break up complex if condition
This commit is contained in:
1 parent
7e1d59377a
commit
3e8038577d
1 file changed
+5
-3
@@ -75,9 +75,11 @@ class Message(Loggable):
|
||||
continue
|
||||
|
||||
dispositions = content_disposition.strip().split(";")
|
||||
if len(dispositions) < 2 or \
|
||||
(not dispositions[0].lower() == "attachment" and
|
||||
"filename" not in dispositions[1].lower()):
|
||||
if len(dispositions) < 2:
|
||||
continue
|
||||
|
||||
if not dispositions[0].lower() == "attachment" and \
|
||||
"filename" not in dispositions[1].lower():
|
||||
continue
|
||||
|
||||
file_data = part.get_payload()
|
||||
|
||||
Reference in new issue
Block a user