Skip to content

Commit

Permalink
- Changed order for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
elipe17 committed Dec 17, 2024
1 parent 0625807 commit 61de699
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/data_files/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_prioritized_queryset(parser_errors, is_s3_s4):
Q(error_type=ParserErrorCategoryChoices.CASE_CONSISTENCY)
filtered_errors = parser_errors.filter(error_type_query)

# If we are a Stratum or Aggregate file, we want all cat2 and cat3 errors.
# If we are a Aggregate or Stratum file, we want all cat2 and cat3 errors.
if is_s3_s4:
all_cat2_cat3 = Q(error_type=ParserErrorCategoryChoices.FIELD_VALUE) | \
Q(error_type=ParserErrorCategoryChoices.VALUE_CONSISTENCY)
Expand Down
4 changes: 2 additions & 2 deletions tdrs-backend/tdpservice/data_files/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ 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)
is_s3_s4 = (DataFile.Section.STRATUM_DATA in datafile.section or
DataFile.Section.AGGREGATE_DATA in datafile.section)
is_s3_s4 = (DataFile.Section.AGGREGATE_DATA in datafile.section or
DataFile.Section.STRATUM_DATA in datafile.section)
filtered_errors = get_prioritized_queryset(all_errors, is_s3_s4)

return Response(get_xls_serialized_file(all_errors, filtered_errors))
Expand Down

0 comments on commit 61de699

Please sign in to comment.