From 7854805bb8d9bec2779b2eb0108250dcc61fb7c1 Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Thu, 23 Dec 2021 21:30:33 +0100 Subject: [PATCH] [notify] skip count == 0 --- server/notify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/notify.js b/server/notify.js index 6e2a6c899..d363f038c 100644 --- a/server/notify.js +++ b/server/notify.js @@ -32,7 +32,7 @@ async function notify() { ...(await db.all(`SELECT 'sources' as type, locale, count(*) as c FROM sources WHERE approved = 0 AND deleted=0 GROUP BY locale`)), ...(await db.all(`SELECT 'names' as type, locale, count(*) as c FROM names WHERE approved = 0 AND deleted=0 GROUP BY locale`)), ...(await db.all(`SELECT 'reports' as type, null as locale, count(*) as c FROM reports WHERE isHandled = 0`)), - ]; + ].filter(r => r.c > 0); if (!awaitingModeration.length) { console.log('No entries awaiting moderation'); return;