diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 09:09:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-19 09:09:23 +0300 |
commit | 37c57082df2119d2daa5dc37ca2a646a0031584d (patch) | |
tree | f985eda92a8a74e8d8209ae7ec321f357d03ed71 /app/services | |
parent | 7b50347823ba6dcfaab59c2107282f4fc44c9a5d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/groups/participants_service.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/services/groups/participants_service.rb b/app/services/groups/participants_service.rb index 575ae1236c2..e939d27d464 100644 --- a/app/services/groups/participants_service.rb +++ b/app/services/groups/participants_service.rb @@ -21,10 +21,9 @@ module Groups private def all_members - return [] if Feature.enabled?(:disable_all_mention) + return [] if group.nil? || Feature.enabled?(:disable_all_mention) - count = group_members.count - [{ username: "all", name: "All Group Members", count: count }] + [{ username: "all", name: "All Group Members", count: group.users_count }] end def group_members @@ -34,6 +33,5 @@ module Groups group.direct_and_indirect_users(share_with_groups: group.member?(current_user)) ) end - strong_memoize_attr :group_members end end |