Skip to content

Commit

Permalink
fix: contact deletions now only apply to the actual group
Browse files Browse the repository at this point in the history
  • Loading branch information
ncosta-ic authored and nilmerg committed Jun 27, 2024
1 parent 270797f commit 8791c69
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion application/forms/ContactGroupForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ public function editGroup(): bool
$toAdd = array_diff($newContacts, $storedContacts);

if (! empty($toDelete)) {
$this->db->delete('contactgroup_member', ['contact_id IN (?)' => $toDelete]);
$this->db->delete(
'contactgroup_member',
[
'contactgroup_id = ?' => $this->contactgroupId,
'contact_id IN (?)' => $toDelete
]
);

$isUpdated = true;
}
Expand Down

0 comments on commit 8791c69

Please sign in to comment.