Average age only needs accepted applications

reminder
Etzelia 2018-12-06 18:00:57 +01:00
parent 3129f8dad0
commit 125730569b
1 changed files with 2 additions and 2 deletions

View File

@ -39,8 +39,8 @@ def overview_data():
# Averages # Averages
data['average'] = { data['average'] = {
'age': round(sum([application.age for application in Application.objects.all()]) / 'age': round(sum([application.age for application in Application.objects.filter(accepted=True)]) /
data['total']['application']['all'] if data['total']['application']['all'] != 0 else 1, 2) data['total']['application']['accepted'] if data['total']['application']['accepted'] != 0 else 1, 2)
} }
# Percentage # Percentage