Skip to content
Snippets Groups Projects
Commit a8f45b0a authored by Karim Ahmed's avatar Karim Ahmed
Browse files

fix: handle 50um case when there is no affixes and an input-source-template...

fix: handle 50um case when there is no affixes and an input-source-template with no affixes placeholder
parent 78f54c70
No related branches found
No related tags found
1 merge request!1039fix(GH2): Avoid getting wrong data sources or including control devices' sources.
......@@ -6,10 +6,14 @@ import extra_data
def map_da_to_source(dc, das, source_template, karabo_id, affixes):
source_names = [
source_template.format(karabo_id=karabo_id, input_source_affixes=aff) # noqa
for aff in affixes
]
if "{input_source_affixes}" in source_template:
source_names = [
source_template.format(karabo_id=karabo_id, input_source_affixes=aff) # noqa
for aff in affixes
]
else: # e.g 50um doesnt need to have affixes.
source_names = [source_template.format(karabo_id=karabo_id)]
if len(source_names) != len(das):
raise ValueError(
"Number of source names (and given affixes) "
......
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