mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 01:27:03 +02:00
typecast obj and add a comment to the contact custom list_display for ContactAdmin
This commit is contained in:
parent
2ba48edb7f
commit
2df68d4b52
1 changed files with 2 additions and 1 deletions
|
@ -264,7 +264,8 @@ class ContactAdmin(ListHeaderAdmin):
|
||||||
# We name the custom prop 'contact' because linter
|
# We name the custom prop 'contact' because linter
|
||||||
# is not allowing a short_description attr on it
|
# is not allowing a short_description attr on it
|
||||||
# This gets around the linter limitation, for now.
|
# This gets around the linter limitation, for now.
|
||||||
def contact(self, obj):
|
def contact(self, obj: models.Contact):
|
||||||
|
""" Duplicate the contact _str_"""
|
||||||
if obj.first_name or obj.last_name:
|
if obj.first_name or obj.last_name:
|
||||||
return obj.get_formatted_name()
|
return obj.get_formatted_name()
|
||||||
elif obj.email:
|
elif obj.email:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue