Remove the need to loop through groups, just add them already

This commit is contained in:
2011-02-16 16:51:35 +00:00
parent d32b15ed64
commit 3826fe31d7

View File

@@ -24,12 +24,8 @@ def update_user_access(user, **kwargs):
# Create a list of all Corp and Alliance groups
corpgroups = []
for corp in EVEPlayerCorporation.objects.filter(group__isnull=False):
if corp.group:
corpgroups.append(corp.group)
for alliance in EVEPlayerAlliance.objects.filter(group__isnull=False):
if alliance.group:
corpgroups.append(alliance.group)
corpgroups.extend(EVEPlayerCorporation.objects.filter(group__isnull=False))
corpgroups.extend(EVEPlayerAlliance.objects.filter(group__isnull=False))
# Create a list of Char groups
chargroups = []