From f66600d7db4b35f3738aac5e5bb190b33efca0c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 12 Dec 2025 14:38:06 +0100 Subject: [PATCH] fix notifications send-email flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- services/notifications/pkg/command/send_email.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/notifications/pkg/command/send_email.go b/services/notifications/pkg/command/send_email.go index a496c5ad7..39f8dca09 100644 --- a/services/notifications/pkg/command/send_email.go +++ b/services/notifications/pkg/command/send_email.go @@ -16,8 +16,8 @@ func SendEmail(cfg *config.Config) *cobra.Command { Use: "send-email", Short: "Send grouped email notifications with daily or weekly interval. Specify at least one of the flags '--daily' or '--weekly'.", RunE: func(cmd *cobra.Command, args []string) error { - daily := cmd.Flag("daily").Changed - weekly := cmd.Flag("weekly").Changed + daily, _ := cmd.Flags().GetBool("daily") + weekly, _ := cmd.Flags().GetBool("weekly") if !daily && !weekly { return errors.New("at least one of '--daily' or '--weekly' must be set") }