Skip to content
Snippets Groups Projects
Commit 29e6ea05 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

FIX: proposed fix for missing types in handle_value

parent f7628859
No related branches found
No related tags found
2 merge requests!53Release 0.1,!45Scalars in cfood definitions
Pipeline #28980 passed with warnings
...@@ -156,15 +156,20 @@ def handle_value(value: Union[dict, str, list], values: GeneralStore): ...@@ -156,15 +156,20 @@ def handle_value(value: Union[dict, str, list], values: GeneralStore):
propvalue = value propvalue = value
# variables replacement: # variables replacement:
propvalue = [replace_variables(i, values) for i in propvalue] propvalue = list()
for element in value:
if type(element) == str:
propvalue.append(replace_variables(element, values))
else:
propvalue.append(element)
return (propvalue, collection_mode) return (propvalue, collection_mode)
else: else:
# value is another simple type # value is another simple type
# collection_mode = "single" collection_mode = "single"
# propvalue = value["value"] propvalue = value
# return (propvalue, collection_mode) # Return it immediately, otherwise variable substitution would be done and fail:
raise RuntimeError() return (propvalue, collection_mode)
propvalue = replace_variables(propvalue, values) propvalue = replace_variables(propvalue, values)
return (propvalue, collection_mode) return (propvalue, collection_mode)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment