diff --git a/app/blueprints/assessments/models/applicants_response.py b/app/blueprints/assessments/models/applicants_response.py index c495ff80..bfb54c97 100644 --- a/app/blueprints/assessments/models/applicants_response.py +++ b/app/blueprints/assessments/models/applicants_response.py @@ -269,11 +269,13 @@ def _ui_component_from_factory(item: dict, application_id: str): ): if isinstance(answer, list): try: - if answer[1][2] == "monthYearField": - input_date = answer[1][1][0] - item["answer"][1][1][0] = _convert_to_month_year( - input_date - ) + for i, ans in enumerate(answer): + if ans[2] == "monthYearField": + for j, val in enumerate(ans[1]): + input_date = val + item["answer"][i][1][j] = _convert_to_month_year( + input_date + ) except IndexError: pass else: diff --git a/app/blueprints/services/data_services.py b/app/blueprints/services/data_services.py index 66689aca..7bfe9f8e 100644 --- a/app/blueprints/services/data_services.py +++ b/app/blueprints/services/data_services.py @@ -620,7 +620,7 @@ def get_all_uploaded_documents_theme_answers( all_uploaded_documents_theme_answers_endpoint ) - if all_uploaded_documents_theme_answers_response: + if isinstance(all_uploaded_documents_theme_answers_response, list): return all_uploaded_documents_theme_answers_response else: msg = (