Merge branch 'fix_group_count_badge' into 'master'

Fix group count badge showing at zero

Closes #1258

See merge request allianceauth/allianceauth!1253
This commit is contained in:
Ariel Rin 2020-09-12 02:05:22 +00:00
commit feb65980d4

View File

@ -22,7 +22,8 @@ class GroupManagementMenuItem(MenuItemHook):
def render(self, request):
if GroupManager.can_manage_groups(request.user):
self.count = GroupManager.pending_requests_count_for_user(request.user)
app_count = GroupManager.pending_requests_count_for_user(request.user)
self.count = app_count if app_count and app_count > 0 else None
return MenuItemHook.render(self, request)
return ''