mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Fix: include documents in trash for existing asn check (#7189)
This commit is contained in:
parent
3cf73a77ac
commit
ada283441c
@ -358,7 +358,9 @@ class ConsumerPlugin(
|
|||||||
f"[{Document.ARCHIVE_SERIAL_NUMBER_MIN:,}, "
|
f"[{Document.ARCHIVE_SERIAL_NUMBER_MIN:,}, "
|
||||||
f"{Document.ARCHIVE_SERIAL_NUMBER_MAX:,}]",
|
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(
|
self._fail(
|
||||||
ConsumerStatusShortMessage.ASN_ALREADY_EXISTS,
|
ConsumerStatusShortMessage.ASN_ALREADY_EXISTS,
|
||||||
f"Not consuming {self.filename}: Given ASN {self.metadata.asn} already exists!",
|
f"Not consuming {self.filename}: Given ASN {self.metadata.asn} already exists!",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user