Skip to content

Commit

Permalink
Address #4458
Browse files Browse the repository at this point in the history
- Fixed 500 errors from occurring when searching the dissemination tables.
- Extended searchable fields when searching tables in the dissemination section.
  • Loading branch information
rnovak338 committed Nov 26, 2024
1 parent c8f4242 commit 2a5e286
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions backend/dissemination/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def has_view_permission(self, request, obj=None):
"additional_ein",
)

search_fields = ("report_id",)
search_fields = ("report_id__report_id", "additional_ein")


class AdditionalUeiAdmin(admin.ModelAdmin):
Expand All @@ -60,7 +60,7 @@ def has_view_permission(self, request, obj=None):
"additional_uei",
)

search_fields = ("report_id",)
search_fields = ("report_id__report_id", "additional_uei")


class CapTextAdmin(admin.ModelAdmin):
Expand All @@ -84,7 +84,7 @@ def has_view_permission(self, request, obj=None):
"finding_ref_number",
)

search_fields = ("report_id",)
search_fields = ("report_id__report_id", "finding_ref_number")


class FederalAwardAdmin(admin.ModelAdmin):
Expand All @@ -108,7 +108,10 @@ def has_view_permission(self, request, obj=None):
"award_reference",
)

search_fields = ("report_id",)
search_fields = (
"report_id__report_id",
"award_reference",
)


class FindingAdmin(admin.ModelAdmin):
Expand All @@ -133,7 +136,7 @@ def has_view_permission(self, request, obj=None):
"reference_number",
)

search_fields = ("report_id",)
search_fields = ("report_id__report_id", "award_reference", "reference_number")


class FindingTextAdmin(admin.ModelAdmin):
Expand All @@ -157,7 +160,7 @@ def has_view_permission(self, request, obj=None):
"finding_ref_number",
)

search_fields = ("report_id",)
search_fields = ("report_id__report_id", "finding_ref_number")


class GeneralAdmin(admin.ModelAdmin):
Expand All @@ -182,7 +185,7 @@ def has_view_permission(self, request, obj=None):
"date_created",
)

search_fields = ("report_id",)
search_fields = ("report_id", "auditee_name", "date_created")


class NoteAdmin(admin.ModelAdmin):
Expand All @@ -206,7 +209,7 @@ def has_view_permission(self, request, obj=None):
"note_title",
)

search_fields = ("report_id",)
search_fields = ("report_id__report_id", "note_title")


class PassThroughAdmin(admin.ModelAdmin):
Expand All @@ -231,7 +234,7 @@ def has_view_permission(self, request, obj=None):
"passthrough_id",
)

search_fields = ("report_id",)
search_fields = ("report_id__report_id", "award_reference", "passthrough_id")


class SecondaryAuditorAdmin(admin.ModelAdmin):
Expand All @@ -255,7 +258,7 @@ def has_view_permission(self, request, obj=None):
"auditor_ein",
)

search_fields = ("report_id",)
search_fields = ("report_id__report_id", "auditor_ein")


class TribalApiAccessKeyIdsAdmin(admin.ModelAdmin):
Expand Down

0 comments on commit 2a5e286

Please sign in to comment.