review comments
This commit is contained in:
parent
be3168d652
commit
0cc773f941
@ -309,10 +309,9 @@ class BarcodePlugin(ConsumeTaskPlugin):
|
|||||||
for raw in tag_texts.split(","):
|
for raw in tag_texts.split(","):
|
||||||
try:
|
try:
|
||||||
tag = None
|
tag = None
|
||||||
|
for regex in settings.CONSUMER_TAG_BARCODE_MAPPING:
|
||||||
mappings = settings.CONSUMER_TAG_BARCODE_MAPPING.items()
|
|
||||||
for regex, sub in mappings:
|
|
||||||
if re.match(regex, raw, flags=re.IGNORECASE):
|
if re.match(regex, raw, flags=re.IGNORECASE):
|
||||||
|
sub = settings.CONSUMER_TAG_BARCODE_MAPPING[regex]
|
||||||
tag = (
|
tag = (
|
||||||
re.sub(regex, sub, raw, flags=re.IGNORECASE)
|
re.sub(regex, sub, raw, flags=re.IGNORECASE)
|
||||||
if sub
|
if sub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user