mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-10 00:56:19 +01:00
Refactor common functions for creating admin user list, peformance tweaks
This commit is contained in:
@@ -50,11 +50,14 @@ if _has_auto_groups:
|
||||
value = self.value()
|
||||
if value == 'Yes':
|
||||
return queryset.exclude(
|
||||
managedalliancegroup__exact=None,
|
||||
managedcorpgroup__exact=None
|
||||
managedalliancegroup__isnull=True,
|
||||
managedcorpgroup__isnull=True
|
||||
)
|
||||
elif value == 'No':
|
||||
return queryset.filter(managedalliancegroup__exact=None).filter(managedcorpgroup__exact=None)
|
||||
return queryset.filter(
|
||||
managedalliancegroup__isnull=True,
|
||||
managedcorpgroup__isnull=True
|
||||
)
|
||||
else:
|
||||
return queryset
|
||||
|
||||
|
||||
Reference in New Issue
Block a user