mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
Fixes collecting list of admins
This commit is contained in:
parent
7e10b0cd1f
commit
b1c6781036
2 changed files with 6 additions and 5 deletions
|
@ -244,9 +244,10 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
|||
def admins(cls):
|
||||
"""Get a queryset of the admins for this instance"""
|
||||
return cls.objects.filter(
|
||||
models.Q(user_permissions__name__in=["moderate_user", "moderate_post"])
|
||||
| models.Q(is_superuser=True)
|
||||
)
|
||||
models.Q(groups__name__in=["moderator", "admin"])
|
||||
| models.Q(is_superuser=True),
|
||||
is_active=True,
|
||||
).distinct()
|
||||
|
||||
def update_active_date(self):
|
||||
"""this user is here! they are doing things!"""
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
{% block about_content %}
|
||||
{# seven day cache #}
|
||||
{% cache 604800 about_page %}
|
||||
{% cache 604800 about_page_superlatives %}
|
||||
|
||||
{% get_book_superlatives as superlatives %}
|
||||
<section class=" pb-4">
|
||||
|
@ -97,6 +97,7 @@
|
|||
</p>
|
||||
|
||||
</section>
|
||||
{% endcache %}
|
||||
|
||||
<section class="block">
|
||||
<header class="content">
|
||||
|
@ -145,5 +146,4 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
{% endcache %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue