diff --git a/src/toolbox_scs/mnemonics_machinery.py b/src/toolbox_scs/mnemonics_machinery.py index d61ca5402d75a84baef331e826d576546f5e1e6c..10a42d9f4ba896f00eec407071d772956febf591 100644 --- a/src/toolbox_scs/mnemonics_machinery.py +++ b/src/toolbox_scs/mnemonics_machinery.py @@ -10,7 +10,6 @@ import logging from .constants import mnemonics as _mnemonics from extra_data import open_run -from numpy import s_ __all__ = [ 'mnemonics_for_run' ] @@ -74,7 +73,9 @@ def mnemo_version_index(run, mnemonic): """ if len(_mnemonics[mnemonic]) == 1: - return 0 + if _mnemonics[mnemonic][0]['source'] in run.all_sources: + return 0 + return -1 for i, v in enumerate(_mnemonics[mnemonic]): if (v['source'] in run.all_sources and v['key'] in run.keys_for_source(v['source'])):