Skip to content

Commit

Permalink
- Change queryset ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
elipe17 committed Oct 21, 2024
1 parent de90f48 commit 1687fd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions tdrs-backend/tdpservice/data_files/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ def assert_error_report_tanf_file_content_matches_with_friendly_names(response):
assert ws.cell(row=1, column=1).value == "Please refer to the most recent versions of the coding " \
+ "instructions (linked below) when looking up items and allowable values during the data revision process"
assert ws.cell(row=8, column=COL_ERROR_MESSAGE).value == (
"Every T1 record should have at least one corresponding T2 or T3 record with the same Item 4 "
"(Reporting Year and Month) and Item 6 (Case Number).")
"No records created.")

@staticmethod
def assert_error_report_ssp_file_content_matches_with_friendly_names(response):
Expand Down Expand Up @@ -134,8 +133,7 @@ def assert_error_report_file_content_matches_without_friendly_names(response):
assert ws.cell(row=1, column=1).value == "Please refer to the most recent versions of the coding " \
+ "instructions (linked below) when looking up items and allowable values during the data revision process"
assert ws.cell(row=8, column=COL_ERROR_MESSAGE).value == (
"Every T1 record should have at least one corresponding T2 or T3 record with the same Item 4 "
"(Reporting Year and Month) and Item 6 (Case Number)."
"No records created."
)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/data_files/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def download(self, request, pk=None):
def download_error_report(self, request, pk=None):
"""Generate and return the parsing error report xlsx."""
datafile = self.get_object()
all_errors = ParserError.objects.filter(file=datafile).order_by('pk')
all_errors = ParserError.objects.filter(file=datafile).order_by('-pk')
filtered_errors = None
user = self.request.user
is_active = "Active" in datafile.section
Expand Down

0 comments on commit 1687fd1

Please sign in to comment.