Skip to content

Commit

Permalink
Changed to check if that specific enity exists, not that the is start…
Browse files Browse the repository at this point in the history
…s with a given base_iri
  • Loading branch information
francescalb committed Nov 23, 2022
1 parent 1f96c1d commit 50ebd64
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ontopy/excelparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,7 @@ def create_ontology_from_pandas( # pylint:disable=too-many-locals,too-many-bran
name = row["prefLabel"]
try:
onto.get_by_label(name)
if any(
item.iri.startswith(onto.base_iri)
for item in onto.get_by_label_all(name)
):
if onto.world[onto.base_iri + name]:
if not force:
raise ExcelError(
f'Concept "{name}" already in ontology'
Expand Down

0 comments on commit 50ebd64

Please sign in to comment.