Fixhancement: improve ASN handling with PDF operations (#11689)

This commit is contained in:
shamoon
2026-02-06 13:14:02 -08:00
committed by GitHub
parent b9b90ec9f7
commit 6192915be7
6 changed files with 349 additions and 43 deletions

View File

@@ -697,7 +697,7 @@ class ConsumerPlugin(
pk=self.metadata.storage_path_id,
)
if self.metadata.asn is not None and not self.metadata.skip_asn:
if self.metadata.asn is not None:
document.archive_serial_number = self.metadata.asn
if self.metadata.owner_id:
@@ -865,8 +865,8 @@ class AsnCheckPlugin(
"""
Check that if override_asn is given, it is unique and within a valid range
"""
if self.metadata.skip_asn or self.metadata.asn is None:
# if skip is set or ASN is None
if self.metadata.asn is None:
# if ASN is None
return
# Validate the range is above zero and less than uint32_t max
# otherwise, Whoosh can't handle it in the index