Commit dbceb98d authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_mrp_quality_assurance: ignore traceability with special character

parent e59dbc80
......@@ -43,8 +43,14 @@ def processAsFuelTank(data):
return data_dict
for traceability in traceability_list:
unicode_decode_error = False
try:
traceability.encode('utf-8')
except UnicodeDecodeError:
unicode_decode_error = True
length = len(traceability)
if length in (30, 14, 26, 18, 10, 39, 28):
if length in (30, 14, 26, 18, 10, 39, 28) and (not unicode_decode_error):
if length == 30:
data_dict = processAsEngine(traceability)
elif length == 14:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment