mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
fixes #175
This commit is contained in:
parent
1de7a490b4
commit
39637fc4aa
@ -3,9 +3,9 @@ import tempfile
|
||||
from datetime import timedelta, date
|
||||
|
||||
import magic
|
||||
import pathvalidate
|
||||
from django.conf import settings
|
||||
from django.db import DatabaseError
|
||||
from django.utils.text import slugify
|
||||
from django_q.tasks import async_task
|
||||
from imap_tools import MailBox, MailBoxUnencrypted, AND, MailMessageFlags, \
|
||||
MailboxFolderSelectError
|
||||
@ -294,7 +294,7 @@ class MailAccountHandler(LoggingMixin):
|
||||
async_task(
|
||||
"documents.tasks.consume_file",
|
||||
path=temp_filename,
|
||||
override_filename=att.filename,
|
||||
override_filename=pathvalidate.sanitize_filename(att.filename), # NOQA: E501
|
||||
override_title=title,
|
||||
override_correspondent_id=correspondent.id if correspondent else None, # NOQA: E501
|
||||
override_document_type_id=doc_type.id if doc_type else None, # NOQA: E501
|
||||
|
Loading…
x
Reference in New Issue
Block a user