# HG changeset patch # User Marcin Kuzminski # Date 2017-04-27 16:40:54 # Node ID 2260b99c9033b1c16ab6f08bce7fac0696bc8a67 # Parent 69c8cca7522107e4707e321118097e678ee280b1 pull-requests: comments don't order by versions since we anyway order by unique number. diff --git a/rhodecode/controllers/pullrequests.py b/rhodecode/controllers/pullrequests.py --- a/rhodecode/controllers/pullrequests.py +++ b/rhodecode/controllers/pullrequests.py @@ -748,7 +748,7 @@ class PullrequestsController(BaseRepoCon # GENERAL COMMENTS with versions # q = comments_model._all_general_comments_of_pull_request(pull_request_latest) q = q.order_by(ChangesetComment.comment_id.asc()) - general_comments = q.order_by(ChangesetComment.pull_request_version_id.asc()) + general_comments = q # pick comments we want to render at current version c.comment_versions = comments_model.aggregate_comments( @@ -758,7 +758,8 @@ class PullrequestsController(BaseRepoCon # INLINE COMMENTS with versions # q = comments_model._all_inline_comments_of_pull_request(pull_request_latest) q = q.order_by(ChangesetComment.comment_id.asc()) - inline_comments = q.order_by(ChangesetComment.pull_request_version_id.asc()) + inline_comments = q + c.inline_versions = comments_model.aggregate_comments( inline_comments, versions, c.at_version_num, inline=True)