fix: contacts count on filter (#7446)

- Fixes the wrong count shown during the contact filter when contact has multiple labels associated.
This commit is contained in:
OMAR.A
2023-07-26 17:31:04 +03:00
committed by GitHub
parent f8ae6cd95c
commit 1d8341504a
2 changed files with 31 additions and 20 deletions

View File

@@ -54,7 +54,7 @@ class Contacts::FilterService < FilterService
end
def base_relation
Current.account.contacts.left_outer_joins(:labels)
Current.account.contacts.distinct(:id).left_outer_joins(:labels)
end
private