From 6b89ca43e43ee60b1b272d5a8c0056e7ed48794b Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:21:00 -0600 Subject: [PATCH] Add comments --- src/registrar/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 590ccbaac..18c1052fc 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -493,7 +493,7 @@ class CustomLogEntryAdmin(LogEntryAdmin): # return super().change_view(request, object_id, form_url, extra_context=extra_context) -# TODO - this should be refactored. This is shared among every class that inherits this, +# TODO #2571 - this should be refactored. This is shared among every class that inherits this, # and it breaks the senior_official field because it exists both as model "Contact" and "SeniorOfficial". class AdminSortFields: _name_sort = ["first_name", "last_name", "email"] @@ -1550,6 +1550,7 @@ class DomainInformationAdmin(ListHeaderAdmin, ImportExportModelAdmin): def formfield_for_foreignkey(self, db_field, request, **kwargs): """Customize the behavior of formfields with foreign key relationships. This will customize the behavior of selects. Customized behavior includes sorting of objects in list.""" + # TODO #2571 # Remove this check on senior_official if this underlying model changes from # "Contact" to "SeniorOfficial" or if we refactor AdminSortFields. # Removing this will cause the list on django admin to return SeniorOffical @@ -2227,6 +2228,7 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin): def formfield_for_foreignkey(self, db_field, request, **kwargs): """Customize the behavior of formfields with foreign key relationships. This will customize the behavior of selects. Customized behavior includes sorting of objects in list.""" + # TODO #2571 # Remove this check on senior_official if this underlying model changes from # "Contact" to "SeniorOfficial" or if we refactor AdminSortFields. # Removing this will cause the list on django admin to return SeniorOffical