From 64095a710a52d413107de78e849fce49c9a4ade4 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 5 Nov 2024 19:36:10 -0800 Subject: [PATCH] Fix: Dont check empty ASNs --- src/documents/serialisers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py index 6f38904da..230b94ffe 100644 --- a/src/documents/serialisers.py +++ b/src/documents/serialisers.py @@ -808,6 +808,8 @@ class DocumentSerializer( def validate(self, attrs): if ( "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( archive_serial_number=attrs["archive_serial_number"], ).exists()