mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 23:16:36 +02:00
Resolve merge conflicts
This commit is contained in:
commit
cc312d1009
1 changed files with 9 additions and 1 deletions
|
@ -683,6 +683,7 @@ class ContactAdmin(ListHeaderAdmin):
|
||||||
list_display = [
|
list_display = [
|
||||||
"name",
|
"name",
|
||||||
"email",
|
"email",
|
||||||
|
"user_exists",
|
||||||
]
|
]
|
||||||
# this ordering effects the ordering of results
|
# this ordering effects the ordering of results
|
||||||
# in autocomplete_fields for user
|
# in autocomplete_fields for user
|
||||||
|
@ -699,7 +700,14 @@ class ContactAdmin(ListHeaderAdmin):
|
||||||
|
|
||||||
change_form_template = "django/admin/email_clipboard_change_form.html"
|
change_form_template = "django/admin/email_clipboard_change_form.html"
|
||||||
|
|
||||||
# We name the custom prop 'name' because linter
|
def user_exists(self, obj):
|
||||||
|
"""Check if the Contact has a related User"""
|
||||||
|
return "Yes" if obj.user is not None else "No"
|
||||||
|
|
||||||
|
user_exists.short_description = "Is user" # type: ignore
|
||||||
|
user_exists.admin_order_field = "user" # type: ignore
|
||||||
|
|
||||||
|
# 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 name(self, obj: models.Contact):
|
def name(self, obj: models.Contact):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue