diff --git a/tdrs-backend/tdpservice/data_files/admin/admin.py b/tdrs-backend/tdpservice/data_files/admin/admin.py index 27c9b8868..51ddfd1d9 100644 --- a/tdrs-backend/tdpservice/data_files/admin/admin.py +++ b/tdrs-backend/tdpservice/data_files/admin/admin.py @@ -4,7 +4,7 @@ # from tdpservice.core.filters import custom_filter_title from tdpservice.data_files.models import DataFile, LegacyFileTransfer from tdpservice.parsers.models import DataFileSummary, ParserError -from tdpservice.data_files.admin.filters import DataFileSummaryPrgTypeFilter, LatestReparseEvent, VersionFilter +from tdpservice.data_files.admin.filters import LatestReparseEvent, VersionFilter from django.conf import settings from django.utils.html import format_html from datetime import datetime, timedelta, timezone @@ -113,14 +113,15 @@ def queryset(self, request, queryset): ] list_filter = [ + 'stt', + 'year', 'quarter', 'section', - 'stt', + 'summary__status', + 'stt__type', + 'stt__region', 'user', - 'year', SubmissionDateFilter, - 'summary__status', - DataFileSummaryPrgTypeFilter, LatestReparseEvent, VersionFilter, ] diff --git a/tdrs-backend/tdpservice/data_files/admin/filters.py b/tdrs-backend/tdpservice/data_files/admin/filters.py index 0f991d882..1429ecd20 100644 --- a/tdrs-backend/tdpservice/data_files/admin/filters.py +++ b/tdrs-backend/tdpservice/data_files/admin/filters.py @@ -4,27 +4,6 @@ from tdpservice.search_indexes.models.reparse_meta import ReparseMeta from tdpservice.core.filters import MostRecentVersionFilter -class DataFileSummaryPrgTypeFilter(admin.SimpleListFilter): - """Admin class filter for Program Type on datafile model.""" - - title = 'Program Type' - parameter_name = 'program_type' - - def lookups(self, request, model_admin): - """Return a list of tuples.""" - return [ - ('TAN', 'TAN'), - ('SSP', 'SSP'), - ] - - def queryset(self, request, queryset): - """Return a queryset.""" - if self.value(): - query_set_ids = [df.id for df in queryset if df.prog_type == self.value()] - return queryset.filter(id__in=query_set_ids) - else: - return queryset - class LatestReparseEvent(admin.SimpleListFilter): """Filter class to filter files based on the latest reparse event.""" diff --git a/tdrs-backend/tdpservice/data_files/models.py b/tdrs-backend/tdpservice/data_files/models.py index 6fe5355e0..66d245c87 100644 --- a/tdrs-backend/tdpservice/data_files/models.py +++ b/tdrs-backend/tdpservice/data_files/models.py @@ -164,8 +164,6 @@ def prog_type(self): # e.g., 'SSP Closed Case Data' if self.section.startswith('SSP'): return 'SSP' - elif self.section.startswith('Tribal'): - return 'TAN' # problematic, do we need to infer tribal entirely from tribe/fips code? else: return 'TAN'