Skip to content

Commit

Permalink
chore: handle null notification summary values
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored and moshloop committed Sep 17, 2024
1 parent 79dd66d commit 26d338d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions views/015_job_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ CREATE OR REPLACE VIEW job_history_names AS

-- Notifications with job history
DROP VIEW IF EXISTS notifications_summary;

CREATE OR REPLACE VIEW notifications_summary AS
WITH notification_send_summary AS (
SELECT
Expand All @@ -215,7 +214,7 @@ WITH notification_send_summary AS (
SELECT
notifications.id,
notifications.name,
notifications.namespace,
COALESCE(notifications.namespace, '') AS namespace,
notifications.title,
notifications.events,
notifications.filter,
Expand All @@ -229,8 +228,8 @@ SELECT
notifications.repeat_interval,
COUNT (event_queue.id) AS pending,
notification_send_summary.avg_duration_ms,
notification_send_summary.failed,
notification_send_summary.sent,
COALESCE(notification_send_summary.failed, 0) AS failed,
COALESCE(notification_send_summary.sent, 0) AS sent,
notification_send_summary.most_common_error
FROM
notifications
Expand Down

0 comments on commit 26d338d

Please sign in to comment.