Shacler fails when project specific and old SPHN ontology are loaded
In the Shacler we have the following logic at line 213:
if ontology_version_old:
# use old pattern
for definition in graph.objects(class_element, SKOS.definition):
subclassesNotAllowed.append(definition.split()[0].split(":")[1])
This code is executed when we use an older version of the SPHN ontology. The issue here is when in the project specific ontology we have for example skos:definition "insurance status value" .
. The first split extracts the value insurance
while the second one tries to split it by colon and then access the first element. From the fact there is no colon in the definition, accessing the first element of the split string will result in an exception.
I don't know exactly what is the purpose of it, but it makes sense to me to avoid this exception somehow.