Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

magic-removal: Fixed #1344 - old-style related objects lookup in User…

… model. Thanks, poissonnier.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2305 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c9839b85e566087655973b4e8b91678bebd6d85f 1 parent 70e7503
@spookylukey spookylukey authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/auth/models.py
View
2  django/contrib/auth/models.py
@@ -156,7 +156,7 @@ def get_group_permissions(self):
def get_all_permissions(self):
if not hasattr(self, '_perm_cache'):
import sets
- self._perm_cache = sets.Set(["%s.%s" % (p.package_id, p.codename) for p in self.get_permission_list()])
+ self._perm_cache = sets.Set(["%s.%s" % (p.package_id, p.codename) for p in self.user_permissions.all()])
self._perm_cache.update(self.get_group_permissions())
return self._perm_cache
Please sign in to comment.
Something went wrong with that request. Please try again.