From 73d33ff25a8d8299963b475af88e440f77790972 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:45:35 -0700 Subject: [PATCH] Fix: include trashed docs in existing doc check (#7229) --- src/documents/consumer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 29185a447..d061a4352 100644 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -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():