Skip to content

Commit

Permalink
Fixed #19632 -- Bug in code sample.
Browse files Browse the repository at this point in the history
Thanks grossmanandy at bfusa com and Simon Charette.
  • Loading branch information
aaugustin committed Jan 18, 2013
1 parent 56f34f9 commit 1dd7492
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/topics/auth/default.txt
Expand Up @@ -466,7 +466,7 @@ checks to make sure the user has an email in the desired domain::
from django.contrib.auth.decorators import user_passes_test

def email_check(user):
return '@example.com' in request.user.email
return '@example.com' in user.email

@user_passes_test(email_check)
def my_view(request):
Expand Down

0 comments on commit 1dd7492

Please sign in to comment.