mirror of
https://github.com/bspeice/UNCCGameDay-Server
synced 2024-11-12 19:18:18 -05:00
Make sure we order the parking rating set correctly...
This commit is contained in:
parent
f094673ecc
commit
658db9981a
@ -62,7 +62,7 @@ class ParkingLot(models.Model):
|
|||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
total = sum([ ParkingRating.RATING_WEIGHTS[r.rating]
|
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
|
return total / NUM_LOTS
|
||||||
|
|
||||||
class ParkingRating(models.Model):
|
class ParkingRating(models.Model):
|
||||||
|
Loading…
Reference in New Issue
Block a user