0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

fix(entry_validator): validator reports list of signal if user chooses the wrong one

This commit is contained in:
2025-03-04 10:57:57 +01:00
parent 1f548bbf9b
commit f4d3820838

View File

@ -22,7 +22,9 @@ class EntryValidator:
if entry is None or entry == "": if entry is None or entry == "":
entry = next(iter(device._hints), name) if hasattr(device, "_hints") else name entry = next(iter(device._hints), name) if hasattr(device, "_hints") else name
if entry not in description: if entry not in description:
raise ValueError(f"Entry '{entry}' not found in device '{name}' signals") raise ValueError(
f"Entry '{entry}' not found in device '{name}' signals. Available signals: {description.keys()}"
)
return entry return entry