From bf4bb607d53d7c81ae41bef7213f66ca9a63ef23 Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Wed, 15 Aug 2018 21:39:04 +0200 Subject: [PATCH] Introduces ordering for services services are now ordered by ascending odometer value instead of their id --- app/entities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/entities.py b/app/entities.py index 8a3df07..d21fc0b 100644 --- a/app/entities.py +++ b/app/entities.py @@ -77,7 +77,8 @@ class Vehicle(db.Model): order_by="asc(Pitstop.odometer)" ) services = db.relationship( - 'Service' + 'Service', + order_by = "asc(Service.odometer)" ) consumables = db.relationship( 'Consumable',