Skip to content

Commit

Permalink
added error check if key is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
bernd-mueller committed Nov 6, 2024
1 parent 62f9e95 commit 81f3225
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/profile_generation_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,10 @@ def generate_property(

# Replace property definitions with their type
for g in data["@graph"]:
if req_label == g["rdfs:label"]:
if not "bioschemas" in g["@id"].split(":")[0]:
req_label = g["@id"]
if g.get("rdfs:label", -1) != -1:
if req_label == g["rdfs:label"]:
if not "bioschemas" in g["@id"].split(":")[0]:
req_label = g["@id"]

new_p["property"] = req_label
print(Fore.GREEN + Style.BRIGHT + f"Property : {req_label}" + Style.RESET_ALL)
Expand Down

0 comments on commit 81f3225

Please sign in to comment.