From 2df68d4b5273be1c683e17cd34425230898a927f Mon Sep 17 00:00:00 2001 From: Rachid Mrad Date: Mon, 11 Sep 2023 16:06:36 -0400 Subject: [PATCH] typecast obj and add a comment to the contact custom list_display for ContactAdmin --- src/registrar/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index a7026e8cc..069c07311 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -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: