mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-12 01:26:47 +01:00
Fix: Dont check empty ASNs
This commit is contained in:
parent
005150c84f
commit
64095a710a
1 changed files with 2 additions and 0 deletions
|
|
@ -808,6 +808,8 @@ class DocumentSerializer(
|
||||||
def validate(self, attrs):
|
def validate(self, attrs):
|
||||||
if (
|
if (
|
||||||
"archive_serial_number" in attrs
|
"archive_serial_number" in attrs
|
||||||
|
and attrs["archive_serial_number"] is not None
|
||||||
|
and len(str(attrs["archive_serial_number"])) > 0
|
||||||
and Document.deleted_objects.filter(
|
and Document.deleted_objects.filter(
|
||||||
archive_serial_number=attrs["archive_serial_number"],
|
archive_serial_number=attrs["archive_serial_number"],
|
||||||
).exists()
|
).exists()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue