Permalink
Browse files

Finalists view can be a lot simpler.

  • Loading branch information...
James Socol
James Socol committed Jan 27, 2011
1 parent be0e2a2 commit 3baccea49a2c8a2973670506c5d0d7ac6c2171c8
Showing with 3 additions and 9 deletions.
  1. +3 −9 apps/games/views.py
View
@@ -109,15 +109,9 @@ def view_list(request):
@enabled_or_404('ALLOW_GALLERY')
def finalists(request):
- """View a list of games."""
- filters = []
- user = request.user if request.user.is_authenticated() else None
- if user and not user.is_superuser:
- filters.append(Q(creator=user))
- if not user or not user.is_superuser:
- filters.append(Q(is_approved=True))
-
- games = Game.objects.filter(reduce(or_, filters, Q()), id__in=settings.FINALIST_LIST).order_by('name')
+ """View the list of finalists."""
+ games = (Game.objects.filter(id__in=settings.FINALIST_LIST)
+ .order_by('name'))
return render(request, 'games/finalists.html', {'games': games})

0 comments on commit 3baccea

Please sign in to comment.