5c54f39e by 周伟奇

fix bug

1 parent e9d30c77
......@@ -85,6 +85,7 @@ def field_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_set, has
def usedcar_info_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_set):
no_match_vino = []
is_find = False
key_right = False
ocr_res_str = ocr_res_dict.get(ocr_field)
if ocr_res_str is not None:
ocr_res_list = json.loads(ocr_res_str)
......@@ -114,6 +115,8 @@ def usedcar_info_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_s
if length > 1:
break
is_find = True
if idx == 0 and compare_res == consts.RESULT_Y:
key_right = True
info_dict[compare_tuple[4]] = compare_res
if input_str is not None:
if idx != 0:
......@@ -130,7 +133,7 @@ def usedcar_info_compare(info_dict, ocr_res_dict, ocr_field, compare_list, res_s
continue
if compare_tuple[0] in info_dict:
del info_dict[compare_tuple[0]]
return is_find, no_match_vino
return is_find and key_right, no_match_vino
@app.task
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!