From cf3645c296a00c885222f201f66f07bd9e6a6b5a Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:47:37 -0700 Subject: [PATCH] Fixes the ASN checking to allow an ASN of 0 (#7878) --- src/documents/consumer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 803d82510..f79d3f9c3 100644 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -348,7 +348,7 @@ class ConsumerPlugin( """ Check that if override_asn is given, it is unique and within a valid range """ - if not self.metadata.asn: + if self.metadata.asn is None: # check not necessary in case no ASN gets set return # Validate the range is above zero and less than uint32_t max @@ -905,7 +905,7 @@ class ConsumerPlugin( pk=self.metadata.storage_path_id, ) - if self.metadata.asn: + if self.metadata.asn is not None: document.archive_serial_number = self.metadata.asn if self.metadata.owner_id: