Skip to content

Commit

Permalink
fix: Send unique list of kinds to be created in db
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramimashkouk committed Dec 11, 2023
1 parent 3c7517a commit 72fcd99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion annotators/bot_knowledge_memorizer/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ def check_abstract_triplets(
except ValueError:
logger.info(f"All entity kinds '{kinds_to_add}' are already in KG")
except Exception: # TODO: replace with Terminusdb DatabaseError
graph.ontology.create_entity_kinds(parents)
try:
graph.ontology.create_entity_kinds(parents)
graph.ontology.create_entity_kinds(kinds_to_add, parents)
except ValueError:
logger.info(f"All entity kinds '{kinds_to_add}' are already in KG")
Expand Down

0 comments on commit 72fcd99

Please sign in to comment.