Improve user and group admin lists

This commit is contained in:
ErikKalkoken
2020-02-05 23:20:44 +01:00
parent 2b8bfbe544
commit f902f59b31
2 changed files with 161 additions and 35 deletions

View File

@@ -102,9 +102,12 @@ class GroupAdmin(admin.ModelAdmin):
def _attributes(self, obj):
attributes = list()
if _has_auto_groups and (obj.managedalliancegroup_set.exists()
if (_has_auto_groups
and (
obj.managedalliancegroup_set.exists()
or obj.managedcorpgroup_set.exists()
):
)
):
attributes.append('Auto Group')
elif obj.authgroup.internal:
attributes.append('Internal')