Merge remote-tracking branch 'origin' into rh/1031-staff-enable-editing

This commit is contained in:
Rebecca Hsieh 2023-10-20 14:49:04 -07:00
commit f8ec478f78
No known key found for this signature in database
GPG key ID: 644527A2F375A379
15 changed files with 232 additions and 38 deletions

View file

@ -219,9 +219,9 @@ class MyUserAdmin(BaseUserAdmin):
# (which should in theory be the ONLY group)
def group(self, obj):
if obj.groups.filter(name="full_access_group").exists():
return "Full access"
return "full_access_group"
elif obj.groups.filter(name="cisa_analysts_group").exists():
return "Analyst"
return "cisa_analysts_group"
return ""
def get_list_display(self, request):
@ -735,7 +735,7 @@ class DomainAdmin(ListHeaderAdmin):
]
def organization_type(self, obj):
return obj.domain_info.organization_type
return obj.domain_info.get_organization_type_display()
organization_type.admin_order_field = ( # type: ignore
"domain_info__organization_type"