mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-15 17:17:02 +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
|
||||
# is not allowing a short_description attr on it
|
||||
# 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:
|
||||
return obj.get_formatted_name()
|
||||
elif obj.email:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue