From 87030cbcd91b01705c3b698aa68f0f1ba20d8de1 Mon Sep 17 00:00:00 2001 From: Shaelyn Tolkamp <46355612+tolkamps1@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:21:32 -0800 Subject: [PATCH] [Track-321] AS add check when results empty (#2486) --- epictrack-api/src/api/reports/anticipated_schedule_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epictrack-api/src/api/reports/anticipated_schedule_report.py b/epictrack-api/src/api/reports/anticipated_schedule_report.py index fd1721e59..9f1543848 100644 --- a/epictrack-api/src/api/reports/anticipated_schedule_report.py +++ b/epictrack-api/src/api/reports/anticipated_schedule_report.py @@ -336,7 +336,7 @@ def _fetch_data(self, report_date): result['next_pecp_short_description'] += block['text'] + '\n' except json.JSONDecodeError: current_app.logger.warning("Failed to decode JSON from next_pecp_short_description") - data_result = namedtuple('data_result', results_dict[0].keys()) + data_result = namedtuple('data_result', results_dict[0].keys()) if len(results_dict) > 0 else () results = [data_result(**result) for result in results_dict] return results