mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Remove the need to loop through groups, just add them already
This commit is contained in:
@@ -24,12 +24,8 @@ def update_user_access(user, **kwargs):
|
|||||||
|
|
||||||
# Create a list of all Corp and Alliance groups
|
# Create a list of all Corp and Alliance groups
|
||||||
corpgroups = []
|
corpgroups = []
|
||||||
for corp in EVEPlayerCorporation.objects.filter(group__isnull=False):
|
corpgroups.extend(EVEPlayerCorporation.objects.filter(group__isnull=False))
|
||||||
if corp.group:
|
corpgroups.extend(EVEPlayerAlliance.objects.filter(group__isnull=False))
|
||||||
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
|
# Create a list of Char groups
|
||||||
chargroups = []
|
chargroups = []
|
||||||
|
|||||||
Reference in New Issue
Block a user