File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ def get_feature_schema_lookup(
14
14
15
15
def flatten_classification (classifications ):
16
16
for classification in classifications :
17
+ if classification .feature_schema_id is None :
18
+ raise ValueError (
19
+ f"feature_schema_id cannot be None for classification `{ classification .name } `."
20
+ )
17
21
if isinstance (classification , ontology .Classification ):
18
22
classification_lookup [
19
23
classification .
@@ -28,6 +32,9 @@ def flatten_classification(classifications):
28
32
flatten_classification (classification .options )
29
33
30
34
for tool in ontology_builder .tools :
35
+ if tool .feature_schema_id is None :
36
+ raise ValueError (
37
+ f"feature_schema_id cannot be None for tool `{ tool .name } `." )
31
38
tool_lookup [tool .name ] = tool .feature_schema_id
32
39
flatten_classification (tool .classifications )
33
40
flatten_classification (ontology_builder .classifications )
You can’t perform that action at this time.
0 commit comments