From c9839b85e566087655973b4e8b91678bebd6d85f Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Sat, 11 Feb 2006 11:08:05 +0000 Subject: [PATCH] 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 --- django/contrib/auth/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 5af223fa6d..72fda34f9c 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -156,7 +156,7 @@ class User(models.Model): 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