mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-30 01:10:04 +02:00
refactor group custom list_display
This commit is contained in:
parent
b4506d0157
commit
0c05518d61
1 changed files with 2 additions and 2 deletions
|
@ -142,9 +142,9 @@ class MyUserAdmin(BaseUserAdmin):
|
||||||
# Let's define First group
|
# Let's define First group
|
||||||
# (which should in theory be the ONLY group)
|
# (which should in theory be the ONLY group)
|
||||||
def group(self, obj):
|
def group(self, obj):
|
||||||
if f"{obj.groups.first()}" == "full_access_group":
|
if obj.groups.filter(name="full_access_group").exists():
|
||||||
return "Super User"
|
return "Super User"
|
||||||
elif f"{obj.groups.first()}" == "cisa_analysts_group":
|
elif obj.groups.filter(name="cisa_analysts_group").exists():
|
||||||
return "Analyst"
|
return "Analyst"
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue