Fix: include trashed docs in existing doc check (#7229)

This commit is contained in:
shamoon 2024-07-12 16:45:35 -07:00 committed by GitHub
parent df153be30e
commit 73d33ff25a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -317,7 +317,7 @@ class ConsumerPlugin(
"""
with open(self.input_doc.original_file, "rb") as f:
checksum = hashlib.md5(f.read()).hexdigest()
existing_doc = Document.objects.filter(
existing_doc = Document.global_objects.filter(
Q(checksum=checksum) | Q(archive_checksum=checksum),
)
if existing_doc.exists():