Introduces ordering for pitstops
Pitstops are now ordered by ascending odometer value instead of their id
This commit is contained in:
parent
879669b4f7
commit
c42a667ca4
|
@ -73,7 +73,8 @@ class Vehicle(db.Model):
|
||||||
owner_id = db.Column(db.Integer, db.ForeignKey('user.id'))
|
owner_id = db.Column(db.Integer, db.ForeignKey('user.id'))
|
||||||
name = db.Column(db.String(255))
|
name = db.Column(db.String(255))
|
||||||
pitstops = db.relationship(
|
pitstops = db.relationship(
|
||||||
'Pitstop'
|
'Pitstop',
|
||||||
|
order_by="asc(Pitstop.odometer)"
|
||||||
)
|
)
|
||||||
services = db.relationship(
|
services = db.relationship(
|
||||||
'Service'
|
'Service'
|
||||||
|
|
Loading…
Reference in New Issue