Average age only needs accepted applications
parent
3129f8dad0
commit
125730569b
|
@ -39,8 +39,8 @@ def overview_data():
|
|||
|
||||
# Averages
|
||||
data['average'] = {
|
||||
'age': round(sum([application.age for application in Application.objects.all()]) /
|
||||
data['total']['application']['all'] if data['total']['application']['all'] != 0 else 1, 2)
|
||||
'age': round(sum([application.age for application in Application.objects.filter(accepted=True)]) /
|
||||
data['total']['application']['accepted'] if data['total']['application']['accepted'] != 0 else 1, 2)
|
||||
}
|
||||
|
||||
# Percentage
|
||||
|
|
Loading…
Reference in New Issue