Skip to content

Commit

Permalink
Change: Log task id on failure to get last report in time period.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abdelsalam authored and greenbonebot committed Jul 30, 2024
1 parent db08be9 commit f50e274
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/create-consolidated-report.gmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ def get_last_report_in_time_period(
)
)
# should always be max 1 report
reports.append(reports_xml.xpath("report/@id")[0])
reports_id = reports_xml.xpath("report/@id")
if reports_id:
reports.append(reports_id[0])
else:
print(f"Failed to get report for task {task_id}")
return reports


Expand Down

0 comments on commit f50e274

Please sign in to comment.