Skip to content

Commit

Permalink
bugfix for None
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyaofei committed Nov 29, 2021
1 parent c67f0e3 commit 9d7960a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nlpir/eye_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def extract_knowledge(
report_type: int
) -> KGBResult:
extract_result_text = __instance__.extract_knowledge(report_text, report_type)
extract_result_dict = json.loads(extract_result_text)
extract_result_dict = json.loads(extract_result_text) if extract_result_text is not None else dict()

single_key_result = extract_result_dict.pop("SingleKey_result", dict())
single_key_result["key_value"] = single_key_result.pop("KeyVals", list())
Expand Down

0 comments on commit 9d7960a

Please sign in to comment.