Skip to content

Commit

Permalink
addedfriendly name to excel report
Browse files Browse the repository at this point in the history
  • Loading branch information
raftmsohani committed Oct 30, 2023
1 parent 90aea2f commit 8f210cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/parsers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def generate_parser_error(datafile, line_number, schema, error_category, error_m

def make_generate_parser_error(datafile, line_number):
"""Configure generate_parser_error with a datafile and line number."""
def generate(schema, error_category, error_message, record=None, field=None, field_json=None):
def generate(schema, error_category, error_message, record=None, field=None):
return generate_parser_error(
datafile=datafile,
line_number=line_number,
Expand Down
5 changes: 2 additions & 3 deletions tdrs-backend/tdpservice/parsers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,14 @@ def _get_xls_serialized_file(self, data):
('year', lambda x: str(x['rpt_month_year'])[0:4] if x['rpt_month_year'] else None),
('month', lambda x: calendar.month_name[int(str(x['rpt_month_year'])[4:])] if x['rpt_month_year'] else None),
('error_type', lambda x: x['error_type']),
('error_message', lambda x: x['error_message']),
('error_message', lambda x: x['error_message'].replace(x['field_name'],str(x['fields_json']['friendly_name']))),
('item_number', lambda x: x['item_number']),
('item_name', lambda x: TANF_ITEM_NAME.get(x['field_name'])),
('item_name', lambda x: x['fields_json']['friendly_name']),
('internal_variable_name', lambda x: x['field_name']),
('row_number', lambda x: x['row_number']),
('column_number', lambda x: x['column_number'])
]


# write beta banner
worksheet.write(row, col,
"Error reporting in TDP is still in development." +
Expand Down

0 comments on commit 8f210cd

Please sign in to comment.