feat: only override steps if metadata value is not in steps enum or in steps enum and performance is not the same

This commit is contained in:
Manuel Schmid 2024-02-18 16:15:39 +01:00
parent 36f6715512
commit f93dd6edcc
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
1 changed files with 2 additions and 1 deletions

View File

@ -96,7 +96,8 @@ def get_steps(key: str, fallback: str | None, source_dict: dict, results: list,
h = source_dict.get(key, source_dict.get(fallback, default))
assert h is not None
h = int(h)
if h not in set(item.value for item in Steps):
# if not in steps or in steps and performance is not the same
if h not in iter(Steps) or Steps(h).name.casefold() != source_dict.get('performance', '').replace(' ', '_').casefold():
results.append(h)
return
results.append(-1)