From 658db9981a62268d79a8cedb39315e40b557ae3d Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Mon, 14 Oct 2013 23:22:53 -0400 Subject: [PATCH] Make sure we order the parking rating set correctly... --- uncc_gameday/gameday/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uncc_gameday/gameday/models.py b/uncc_gameday/gameday/models.py index 1f5351f..392704c 100755 --- a/uncc_gameday/gameday/models.py +++ b/uncc_gameday/gameday/models.py @@ -62,7 +62,7 @@ class ParkingLot(models.Model): return None else: total = sum([ ParkingRating.RATING_WEIGHTS[r.rating] - for r in self.parkingrating_set.all().order_by('created')[0:10] ]) + for r in self.parkingrating_set.all().order_by('-created')[0:10] ]) return total / NUM_LOTS class ParkingRating(models.Model):