changeset 3262:14e9a06c37a7 beta

fix order of pull-requests in show all page
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 30 Jan 2013 00:11:35 +0100
parents 54a439edaf99
children 1095b67f8054
files rhodecode/model/pull_request.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/model/pull_request.py	Tue Jan 29 23:51:53 2013 +0100
+++ b/rhodecode/model/pull_request.py	Wed Jan 30 00:11:35 2013 +0100
@@ -53,7 +53,10 @@
 
     def get_all(self, repo):
         repo = self._get_repo(repo)
-        return PullRequest.query().filter(PullRequest.other_repo == repo).all()
+        return PullRequest.query()\
+                .filter(PullRequest.other_repo == repo)\
+                .order_by(PullRequest.created_on)\
+                .all()
 
     def create(self, created_by, org_repo, org_ref, other_repo, other_ref,
                revisions, reviewers, title, description=None):