From 02794e9629ba3126cc9131693269527f9df9db21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Sat, 29 Jun 2024 19:41:38 +0200 Subject: [PATCH] Fixed NODATA notifications --- notification_log.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notification_log.go b/notification_log.go index c6d0a71..5445833 100644 --- a/notification_log.go +++ b/notification_log.go @@ -48,7 +48,7 @@ func notificationsSent(from, to time.Time) (nss []NotificationSend, err error) { n.prio, n.service, - t.name AS trigger_name, + COALESCE(t.name, '') AS trigger_name, ns.id, ns.uuid, @@ -59,8 +59,8 @@ func notificationsSent(from, to time.Time) (nss []NotificationSend, err error) { FROM public.notification_send ns INNER JOIN notification n ON ns.notification_id = n.id - INNER JOIN problem p ON ns.problem_id = p.id - INNER JOIN "trigger" t ON p.trigger_id = t.id + LEFT JOIN problem p ON ns.problem_id = p.id + LEFT JOIN "trigger" t ON p.trigger_id = t.id WHERE ns.send >= $1 AND ns.send <= $2