mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Fix: include trashed docs in existing doc check (#7229)
This commit is contained in:
parent
df153be30e
commit
73d33ff25a
@ -317,7 +317,7 @@ class ConsumerPlugin(
|
|||||||
"""
|
"""
|
||||||
with open(self.input_doc.original_file, "rb") as f:
|
with open(self.input_doc.original_file, "rb") as f:
|
||||||
checksum = hashlib.md5(f.read()).hexdigest()
|
checksum = hashlib.md5(f.read()).hexdigest()
|
||||||
existing_doc = Document.objects.filter(
|
existing_doc = Document.global_objects.filter(
|
||||||
Q(checksum=checksum) | Q(archive_checksum=checksum),
|
Q(checksum=checksum) | Q(archive_checksum=checksum),
|
||||||
)
|
)
|
||||||
if existing_doc.exists():
|
if existing_doc.exists():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user