Skip to content

Commit

Permalink
Cleanup sql
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Nov 2, 2023
1 parent a03f874 commit b0bf2e8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/models/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ func triggerMatchQualifiers(t *Trigger, channel *Channel, contactGroups map[Grou
const sqlSelectTriggersByOrg = `
SELECT ROW_TO_JSON(r) FROM (
SELECT
t.id AS id,
t.org_id AS org_id,
t.flow_id AS flow_id,
t.trigger_type AS trigger_type,
t.keywords AS keywords,
t.match_type AS match_type,
t.channel_id AS channel_id,
t.id,
t.org_id,
t.flow_id,
t.trigger_type,
t.keywords,
t.match_type,
t.channel_id,
COALESCE(t.referrer_id, '') AS referrer_id,
ARRAY_REMOVE(ARRAY_AGG(DISTINCT ig.contactgroup_id), NULL) AS include_group_ids,
ARRAY_REMOVE(ARRAY_AGG(DISTINCT eg.contactgroup_id), NULL) AS exclude_group_ids
Expand Down

0 comments on commit b0bf2e8

Please sign in to comment.