diff --git a/src/sparqlunicorn_ontdoc/docgeneration.py b/src/sparqlunicorn_ontdoc/docgeneration.py index b530222d..f4ed2ce8 100644 --- a/src/sparqlunicorn_ontdoc/docgeneration.py +++ b/src/sparqlunicorn_ontdoc/docgeneration.py @@ -650,7 +650,10 @@ def getClassTree(self,graph, uritolabel,classidset,uritotreeitem): for res in results: #print(res) if "_:" not in str(res["subject"]) and str(res["subject"]).startswith("http"): - ress[str(res["subject"])] = {"super": res["supertype"], "label": res["label"]} + if "_:" not in str(res["supertype"]) and str(res["supertype"]).startswith("http"): + ress[str(res["subject"])] = {"super": res["supertype"], "label": res["label"]} + else: + ress[str(res["subject"])] = {"super": None, "label": res["label"]} #print(ress) for cls in ress: for obj in graph.subjects(URIRef(self.typeproperty), URIRef(cls),True):