Skip to content
Snippets Groups Projects
Commit ced5ce8f authored by Swen Vermeul's avatar Swen Vermeul
Browse files

bugfix: Controlled Vocabulary

parent cad3d0a0
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ class PropertyHolder():
if name in self._property_names:
property_type = self._property_names[name]
if property_type['dataType'] == 'CONTROLLEDVOCABULARY':
return self._get_terms(property_type['vocabulary']['code'])
return self._get_terms(property_type['code'])
else:
syntax = { property_type["label"] : property_type["dataType"]}
if property_type["dataType"] == "TIMESTAMP":
......@@ -82,7 +82,7 @@ class PropertyHolder():
property_type = self._property_names[name]
data_type = property_type['dataType']
if data_type == 'CONTROLLEDVOCABULARY':
voc = self._get_terms(property_type['vocabulary']['code'])
voc = self._get_terms(property_type['code'])
value = str(value).upper()
if value not in voc.df['code'].values:
raise ValueError("Value for attribute {} must be one of these terms: {}".format(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment