mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-01 11:19:32 -05:00
Fix: include documents in trash for existing asn check (#7189)
This commit is contained in:
parent
6f3bc54c41
commit
72c27955dd
@ -358,7 +358,9 @@ class ConsumerPlugin(
|
||||
f"[{Document.ARCHIVE_SERIAL_NUMBER_MIN:,}, "
|
||||
f"{Document.ARCHIVE_SERIAL_NUMBER_MAX:,}]",
|
||||
)
|
||||
if Document.objects.filter(archive_serial_number=self.metadata.asn).exists():
|
||||
if Document.global_objects.filter(
|
||||
archive_serial_number=self.metadata.asn,
|
||||
).exists():
|
||||
self._fail(
|
||||
ConsumerStatusShortMessage.ASN_ALREADY_EXISTS,
|
||||
f"Not consuming {self.filename}: Given ASN {self.metadata.asn} already exists!",
|
||||
|
Loading…
x
Reference in New Issue
Block a user