mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-18 05:48:13 +00:00
Fixes the ASN checking to allow an ASN of 0 (#7878)
This commit is contained in:
1 parent
facec317ef
commit
cf3645c296
1 file changed
+2
-2
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user