From 151d337f6c7729b54528c9d0a58c4363d9d64831 Mon Sep 17 00:00:00 2001 From: Evgenii Date: Tue, 26 Dec 2023 03:33:30 +0300 Subject: [PATCH] Fix: update ASN regex to support Unicode (#5099) --- src/documents/barcodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/documents/barcodes.py b/src/documents/barcodes.py index 3e2b309b6..005531107 100644 --- a/src/documents/barcodes.py +++ b/src/documents/barcodes.py @@ -105,7 +105,7 @@ class BarcodeReader: asn_text = asn_text[len(settings.CONSUMER_ASN_BARCODE_PREFIX) :].strip() # remove non-numeric parts of the remaining string - asn_text = re.sub("[^0-9]", "", asn_text) + asn_text = re.sub(r"\D", "", asn_text) # now, try parsing the ASN number try: