From 7724ce17a0fbdaa12d74fbdf38562fa0b95e6014 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Thu, 21 Nov 2024 23:35:13 -0500 Subject: [PATCH] Fix query excluding learned --- pkg/database/talkgroups.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/database/talkgroups.go b/pkg/database/talkgroups.go index 0773abb..b52791c 100644 --- a/pkg/database/talkgroups.go +++ b/pkg/database/talkgroups.go @@ -44,8 +44,7 @@ const getTalkgroupsWithLearnedBySysTGID = `SELECT tg.id, tg.system_id, tg.tgid, tg.name, tg.alpha_tag, tg.tg_group, tg.frequency, tg.metadata, tg.tags, tg.alert, tg.alert_config, tg.weight, sys.id, sys.name, tg.learned, tg.ignored FROM talkgroups tg JOIN systems sys ON tg.system_id = sys.id -JOIN UNNEST($1::INT4[], $2::INT4[]) AS tgt(sys, tg) ON (tg.system_id = tgt.sys AND tg.tgid = tgt.tg) -WHERE tg.learned IS NOT TRUE;` +JOIN UNNEST($1::INT4[], $2::INT4[]) AS tgt(sys, tg) ON (tg.system_id = tgt.sys AND tg.tgid = tgt.tg);` type GetTalkgroupsRow struct { Talkgroup Talkgroup `json:"talkgroup"`