Skip to content

Commit

Permalink
[Track-321] AS add check when results empty (#2486)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolkamps1 authored Dec 17, 2024
1 parent 075ddcc commit 87030cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 87030cb

Please sign in to comment.