Fixed NODATA notifications

This commit is contained in:
Magnus Åhall 2024-06-29 19:41:38 +02:00
parent dd126fece2
commit 02794e9629

View File

@ -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