From d364b5a65dc5043af0bdf2c0c835b88482976f1f Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 17 Feb 2011 22:34:08 +0000 Subject: [PATCH] Revert "Remove the need to loop through groups, just add them already" This reverts commit 3826fe31d70d9dfddd2a2f539ce2d731473bdbf1. --- sso/tasks.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sso/tasks.py b/sso/tasks.py index 9acdc64..7bb123a 100644 --- a/sso/tasks.py +++ b/sso/tasks.py @@ -24,8 +24,12 @@ def update_user_access(user, **kwargs): # Create a list of all Corp and Alliance groups corpgroups = [] - corpgroups.extend(EVEPlayerCorporation.objects.filter(group__isnull=False)) - corpgroups.extend(EVEPlayerAlliance.objects.filter(group__isnull=False)) + 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) # Create a list of Char groups chargroups = []