Make sure we order the parking rating set correctly...

This commit is contained in:
Bradlee Speice 2013-10-14 23:22:53 -04:00
parent f094673ecc
commit 658db9981a

View File

@ -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):