454bef83 by 周伟奇

fix license1 bug

1 parent 7c92f402
...@@ -149,12 +149,11 @@ class Command(BaseCommand, LoggerMixin): ...@@ -149,12 +149,11 @@ class Command(BaseCommand, LoggerMixin):
149 license_data = ocr_data.get('data', []) 149 license_data = ocr_data.get('data', [])
150 if not license_data: 150 if not license_data:
151 return 151 return
152 _, license_key = consts.CLASSIFY_PID_DICT.get(classify)
153 for license_dict in license_data: 152 for license_dict in license_data:
154 res_list = [] 153 res_list = []
155 for field, value in license_dict.items(): 154 for field, value in license_dict.items():
156 res_list.append((field, value)) 155 res_list.append((field, value))
157 license_summary.setdefault(license_key, []).append(res_list) 156 license_summary.setdefault(classify, []).append(res_list)
158 157
159 @staticmethod 158 @staticmethod
160 def license2_process(ocr_res_2, license_summary, pid, classify): 159 def license2_process(ocr_res_2, license_summary, pid, classify):
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!