Skip to content

Commit

Permalink
Allow admins to moderate events
Browse files Browse the repository at this point in the history
  • Loading branch information
akatsoulas committed Mar 27, 2024
1 parent 6c089be commit 790b803
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion moderator/moderate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def edit_event(request, slug=None):
def moderate_event(request, slug, q_id=None, accepted=None):
event = get_object_or_404(Event, slug=slug)
user = request.user
if not event.moderators.filter(pk=user.pk).exists():

if not (event.moderators.filter(pk=user.pk).exists() or user.is_superuser):
raise Http404

questions = Question.objects.filter(event=event, is_accepted__isnull=True)
Expand Down

0 comments on commit 790b803

Please sign in to comment.