Introduces ordering for services

services are now ordered by ascending odometer value instead of
their id
This commit is contained in:
Joachim Lusiardi 2018-08-15 21:39:04 +02:00
parent b3cb88e870
commit bf4bb607d5
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ class Vehicle(db.Model):
order_by="asc(Pitstop.odometer)" order_by="asc(Pitstop.odometer)"
) )
services = db.relationship( services = db.relationship(
'Service' 'Service',
order_by = "asc(Service.odometer)"
) )
consumables = db.relationship( consumables = db.relationship(
'Consumable', 'Consumable',