From 4a2d93190eff186c19c64f15191a19859ca1a136 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 22 Feb 2012 18:45:52 +0530 Subject: [PATCH] fix stats --- chaloBEST/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chaloBEST/views.py b/chaloBEST/views.py index ec36d2b..db970db 100644 --- a/chaloBEST/views.py +++ b/chaloBEST/views.py @@ -17,7 +17,7 @@ def stats(request): total_stops = Stop.objects.count() stops_left = total_stops for stp in Stop.objects.all(): - if stp.stoplocation_set.all(): + if stp.point: stops_left-=1 @@ -30,7 +30,7 @@ def stats(request): area_stops = area.stop_set.all() astops_left = len(area_stops) for stp in area_stops: - if stp.stoplocation_set.all(): + if stp.point: astops_left-=1 area_stat.append({'area':area,'neededstops':astops_left})