Fix: prevent ASN collisions for merge operations (#11634)

This commit is contained in:
shamoon
2025-12-19 20:05:34 -08:00
committed by GitHub
parent 4e789acf2d
commit 7604a0b583
6 changed files with 24 additions and 4 deletions

View File

@@ -186,7 +186,11 @@ class BarcodePlugin(ConsumeTaskPlugin):
# Update/overwrite an ASN if possible
# After splitting, as otherwise each split document gets the same ASN
if self.settings.barcode_enable_asn and (located_asn := self.asn) is not None:
if (
self.settings.barcode_enable_asn
and not self.metadata.skip_asn
and (located_asn := self.asn) is not None
):
logger.info(f"Found ASN in barcode: {located_asn}")
self.metadata.asn = located_asn