Fixed #6991 -- Removed some redundant user.is_authenticated() calls in various places. Thanks, alexkoshelev, Liang Feng and Ivan Sagalaev

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2010-01-09 20:11:01 +00:00
parent 8a109a7bc8
commit 933b9e8de7
5 changed files with 5 additions and 5 deletions

View file

@ -1031,7 +1031,7 @@ checks to make sure the user is logged in and has the permission
``polls.can_vote``::
def my_view(request):
if not (request.user.is_authenticated() and request.user.has_perm('polls.can_vote')):
if not request.user.has_perm('polls.can_vote'):
return HttpResponse("You can't vote in this poll.")
# ...