A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Fixes the barcode setting always overriding the ASN, even if one wasn't found
Trenton Ha3842d9228da
diff --git a/src/documents/tasks.py b/src/documents/tasks.pyindex d320875a0..97a7791f3 100644--- a/src/documents/tasks.py+++ b/src/documents/tasks.py@@ -124,10 +124,11 @@ def consume_file(return "File successfully split"# try reading the ASN from barcode- if settings.CONSUMER_ENABLE_ASN_BARCODE:+ if settings.CONSUMER_ENABLE_ASN_BARCODE and reader.asn is not None:+ # Note this will take precedence over an API provided ASN+ # But it's from a physical barcode, so that's goodoverrides.asn = reader.asn- if overrides.asn:- logger.info(f"Found ASN in barcode: {overrides.asn}")+ logger.info(f"Found ASN in barcode: {overrides.asn}")# continue with consumption if no barcode was founddocument = Consumer().try_consume_file(