Ticket #14731: permission-id-fix-20101119.diff
File permission-id-fix-20101119.diff, 914 bytes (added by , 14 years ago) |
---|
-
django/contrib/auth/management/__init__.py
23 23 24 24 # This will hold the permissions we're looking for as 25 25 # (content_type, (codename, name)) 26 searched_perms = set()26 searched_perms = [] 27 27 # The codenames and ctypes that should exist. 28 28 ctypes = set() 29 29 for klass in app_models: 30 30 ctype = ContentType.objects.get_for_model(klass) 31 31 ctypes.add(ctype) 32 32 for perm in _get_all_permissions(klass._meta): 33 searched_perms.a dd((ctype, perm))33 searched_perms.append((ctype, perm)) 34 34 35 35 # Find all the Permissions that have a context_type for a model we're 36 36 # looking for. We don't need to check for codenames since we already have