Skip to content

Commit

Permalink
ContactGroup.group_type can no longer be 'U'
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Mar 29, 2022
1 parent 736b5c7 commit 799dea8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/models/contacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ func StopContact(ctx context.Context, db Queryer, orgID OrgID, contactID Contact
const sqlDeleteAllContactGroups = `
DELETE FROM contacts_contactgroup_contacts
WHERE contact_id = $2 AND contactgroup_id = ANY(
SELECT id from contacts_contactgroup WHERE org_id = $1 and group_type IN ('M', 'Q', 'U')
SELECT id from contacts_contactgroup WHERE org_id = $1 and group_type IN ('M', 'Q')
)`

const sqlDeleteAllContactTriggers = `
Expand Down
2 changes: 1 addition & 1 deletion core/models/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const selectGroupsSQL = `
SELECT ROW_TO_JSON(r) FROM (
SELECT id, uuid, name, query
FROM contacts_contactgroup
WHERE org_id = $1 AND group_type IN ('M', 'Q', 'U') AND is_active = TRUE
WHERE org_id = $1 AND group_type IN ('M', 'Q') AND is_active = TRUE
ORDER BY name ASC
) r;`

Expand Down
Binary file modified mailroom_test.dump
Binary file not shown.

0 comments on commit 799dea8

Please sign in to comment.