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
This commit is contained in:
parent
70e75036a8
commit
c9839b85e5
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue