Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #18093 -- Added a pk to AnonymousUser.

  • Loading branch information...
commit b1155adcde0282a533a5ad1d7220adbd52011230 1 parent c970bcf
@aaugustin aaugustin authored
View
1  django/contrib/auth/models.py
@@ -404,6 +404,7 @@ def get_profile(self):
class AnonymousUser(object):
id = None
+ pk = None
username = ''
is_staff = False
is_active = False
View
1  django/contrib/auth/tests/basic.py
@@ -52,6 +52,7 @@ def test_user_no_email(self):
def test_anonymous_user(self):
"Check the properties of the anonymous user"
a = AnonymousUser()
+ self.assertEqual(a.pk, None)
self.assertFalse(a.is_authenticated())
self.assertFalse(a.is_staff)
self.assertFalse(a.is_active)

0 comments on commit b1155ad

Please sign in to comment.
Something went wrong with that request. Please try again.