mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Fix: Dont check empty ASNs
This commit is contained in:
parent
005150c84f
commit
64095a710a
@ -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…
x
Reference in New Issue
Block a user