5958e83d by chenyao

添加判断tmp_res是否为空的逻辑

1 parent f39ea716
...@@ -1018,9 +1018,9 @@ class Command(BaseCommand, LoggerMixin): ...@@ -1018,9 +1018,9 @@ class Command(BaseCommand, LoggerMixin):
1018 # 添加处理, 1018 # 添加处理,
1019 # [售后回租合同] - 如果 key 是 "承租人签字", 且内容中包含 签署日期:XXXX, 则将签署日期去除 1019 # [售后回租合同] - 如果 key 是 "承租人签字", 且内容中包含 签署日期:XXXX, 则将签署日期去除
1020 # [车辆租赁抵押合同] - 如果 key 是 "" 1020 # [车辆租赁抵押合同] - 如果 key 是 ""
1021 if key == '承租人签字' and '签署日期' in tmp_res: 1021 if key == '承租人签字' and tmp_res is not None and '签署日期' in tmp_res:
1022 res[key] = tmp_res.split('签署日期')[0] 1022 res[key] = tmp_res.split('签署日期')[0]
1023 if key == "抵押人签字" and "签署日期" in tmp_res: 1023 if key == "抵押人签字" and tmp_res is not None and "签署日期" in tmp_res:
1024 res[key] = tmp_res.split("签署日期")[0] 1024 res[key] = tmp_res.split("签署日期")[0]
1025 res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(img_pno), {}).get( 1025 res.setdefault(consts.IMG_PATH_KEY, dict())[key] = page_info_dict.get(str(img_pno), {}).get(
1026 consts.IMG_PATH_KEY, '') 1026 consts.IMG_PATH_KEY, '')
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!