# HG changeset patch # User Marcin Kuzminski # Date 2013-01-29 23:11:35 # Node ID 14e9a06c37a763f04764aba009a2b8f8bdcceef6 # Parent 54a439edaf99988b069640b59fca00788b270874 fix order of pull-requests in show all page diff --git a/rhodecode/model/pull_request.py b/rhodecode/model/pull_request.py --- a/rhodecode/model/pull_request.py +++ b/rhodecode/model/pull_request.py @@ -53,7 +53,10 @@ class PullRequestModel(BaseModel): 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):