Merge pull request #1796 from bookwyrm-social/about-admins

Makes query to get admins unique
This commit is contained in:
Mouse Reeve 2022-01-08 18:54:59 -08:00 committed by GitHub
commit 3048311a5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,9 @@ def about(request):
"status_count": models.Status.objects.filter(
user__local=True, deleted=False
).count(),
"admins": models.User.objects.filter(groups__name__in=["admin", "moderator"]),
"admins": models.User.objects.filter(
groups__name__in=["admin", "moderator"]
).distinct(),
"version": settings.VERSION,
}