fix: divide by zero error
This commit is contained in:
parent
20a1d375f3
commit
318affedb8
@ -112,6 +112,9 @@ def get_chart_data(data):
|
||||
}
|
||||
|
||||
def get_report_summary(data):
|
||||
if not data:
|
||||
return None
|
||||
|
||||
avg_completion = sum([project.percent_complete for project in data]) / len(data)
|
||||
total = sum([project.total_tasks for project in data])
|
||||
total_overdue = sum([project.overdue_tasks for project in data])
|
||||
|
Loading…
x
Reference in New Issue
Block a user