Skip to content

Commit

Permalink
Merge pull request #486 from akatsoulas/admin-404
Browse files Browse the repository at this point in the history
Allow admins to moderate events
  • Loading branch information
akatsoulas authored Mar 27, 2024
2 parents 6c089be + 790b803 commit fcec896
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 fcec896

Please sign in to comment.