Skip to content

Commit

Permalink
notifications: fix choice validation in stage 3
Browse files Browse the repository at this point in the history
Change-Id: Ib3da9dc6303bb3d7023e95f944bcd7b389b05928
  • Loading branch information
loocars committed Nov 6, 2024
1 parent ece42eb commit 228c256
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmk/gui/wato/pages/notifications/quick_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,10 @@ def _components() -> Sequence[Widget]:
)


def _validate_parameter_choice(p):
if p[1] is None:
def _validate_parameter_choice(script_config: tuple[str, object]) -> None:
parameter_choice = script_config[1]
assert isinstance(parameter_choice, dict)
if parameter_choice.get("parameter_id") is None:
raise ValidationError(
Message("Please choose a notification parameter or create one."),
)
Expand Down

0 comments on commit 228c256

Please sign in to comment.