Skip to content

Commit

Permalink
quick_setup: don't allow selecting of host/service without adding events
Browse files Browse the repository at this point in the history
In stage 1: Triggering events, it was possible to check the
Host/Service events checkbox but not select any events for
them.  This change modifies the already existing validator
to catch this.

Change-Id: I9e45967c492b5436e2870fd1ccddf47315d0b05b
  • Loading branch information
TribeGav committed Feb 21, 2025
1 parent 434b387 commit 213acee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmk/gui/wato/pages/notifications/quick_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def custom_recap_formspec_triggering_events(
def _validate_empty_selection(selections: Sequence[Sequence[str | None]]) -> None:
# TODO validation seems not to be possible for a single empty element of
# the Tuple
if ["", None] in selections:
if ["", None] in selections or not selections:
raise ValidationError(
Message("At least one selection is missing."),
)
Expand Down

0 comments on commit 213acee

Please sign in to comment.