Skip to content

Commit

Permalink
Fix TME qrcode regex
Browse files Browse the repository at this point in the history
  • Loading branch information
30350n committed Oct 2, 2023
1 parent 7e8abcb commit bab4614
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,6 @@ def test_receive_missing_quantity(self):

TME_QRCODE = (
"QTY:1 PN:WBP-302 PO:19361337/1 CPO:PO-2023-06-08-001337 MFR:WISHERENTERPRI"
"SE MPN:WBP-302 https://www.tme.eu/details/WBP-302"
"SE MPN:WBP-302 RoHS https://www.tme.eu/details/WBP-302"
)
TME_DATAMATRIX_CODE = "PWBP-302 1PWBP-302 Q1 K19361337/1"
2 changes: 1 addition & 1 deletion InvenTree/plugin/builtin/suppliers/tme.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def parse_supplier_barcode_data(self, barcode_data):
return supplier_part, barcode_fields


TME_IS_QRCODE_REGEX = re.compile(r"^(([^\s:]+):([^\s:]+)(\s+|$))+")
TME_IS_QRCODE_REGEX = re.compile(r"^(\S+(\s+|$))+")
TME_PARSE_QRCODE_REGEX = re.compile(r"([^\s:]+):([^\s:]+)(?:\s+|$)")
TME_BARCODE2D_REGEX = re.compile(r"([^\s]+)(?:\s+|$)")
QRCODE_FIELD_NAME_MAP = {
Expand Down

0 comments on commit bab4614

Please sign in to comment.