Mercurial > kallithea
changeset 5761:0c29e737db23
pullrequests: explicitly sort statuses and comments by id - and thus presumably in the right order used for computation of latest status
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 14 Mar 2016 16:17:46 +0100 |
parents | 272cb88d97c2 |
children | d36dc6617d87 |
files | kallithea/model/db.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/db.py Mon Mar 07 18:45:14 2016 +0100 +++ b/kallithea/model/db.py Mon Mar 14 16:17:46 2016 +0100 @@ -2317,8 +2317,8 @@ cascade="all, delete-orphan") org_repo = relationship('Repository', primaryjoin='PullRequest.org_repo_id==Repository.repo_id') other_repo = relationship('Repository', primaryjoin='PullRequest.other_repo_id==Repository.repo_id') - statuses = relationship('ChangesetStatus') - comments = relationship('ChangesetComment', + statuses = relationship('ChangesetStatus', order_by='ChangesetStatus.changeset_status_id') + comments = relationship('ChangesetComment', order_by='ChangesetComment.comment_id', cascade="all, delete-orphan") def is_closed(self):