From e099895e5f3483f35dec0455bb34f4cc1735b054 Mon Sep 17 00:00:00 2001 From: Dinuka De Silva Date: Tue, 14 Jul 2020 12:18:22 +0530 Subject: [PATCH] gh-676: Fix the party order in PE-27 --- results-tabulation-api/orm/entities/Election/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/results-tabulation-api/orm/entities/Election/__init__.py b/results-tabulation-api/orm/entities/Election/__init__.py index cba38d75..2c7b8b21 100644 --- a/results-tabulation-api/orm/entities/Election/__init__.py +++ b/results-tabulation-api/orm/entities/Election/__init__.py @@ -23,7 +23,7 @@ class ElectionModel(db.Model): isListed = db.Column(db.Boolean, nullable=False, default=False) metaId = db.Column(db.Integer, db.ForeignKey(Meta.Model.__table__.c.metaId), nullable=True) - parties = relationship("ElectionPartyModel") + parties = relationship("ElectionPartyModel", order_by="ElectionPartyModel.electionPartyId") _invalidVoteCategories = relationship("InvalidVoteCategoryModel") subElections = relationship("ElectionModel", foreign_keys=[parentElectionId]) rootElection = relationship("ElectionModel", remote_side=[electionId], foreign_keys=[rootElectionId])