From 213acee6692be1b1733f86b990fb916066c6bb74 Mon Sep 17 00:00:00 2001 From: Gav Date: Fri, 21 Feb 2025 14:29:30 +0100 Subject: [PATCH] quick_setup: don't allow selecting of host/service without adding events 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 --- cmk/gui/wato/pages/notifications/quick_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmk/gui/wato/pages/notifications/quick_setup.py b/cmk/gui/wato/pages/notifications/quick_setup.py index a336b58f2c4..d476562b153 100644 --- a/cmk/gui/wato/pages/notifications/quick_setup.py +++ b/cmk/gui/wato/pages/notifications/quick_setup.py @@ -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."), )