Fix: update ASN regex to support Unicode (#5099)

This commit is contained in:
Evgenii 2023-12-26 03:33:30 +03:00 committed by GitHub
parent e16a790b14
commit 1dc8477a00

View File

@ -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: