# HG changeset patch # User Thomas De Schampheleire # Date 1542401121 -3600 # Node ID aee1f11faa8ce82d4414233d4451fb768f5c89e8 # Parent 471b29a2f302e8cb4586fac1f98f20f8038a7817 controllers: pullrequests: comments are always using AJAX This is preparation to align commenting on changeset and pullrequests. diff -r 471b29a2f302 -r aee1f11faa8c kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py Sat Nov 10 21:35:54 2018 +0100 +++ b/kallithea/controllers/pullrequests.py Fri Nov 16 21:45:21 2018 +0100 @@ -632,6 +632,7 @@ @HasRepoPermissionLevelDecorator('read') @jsonify def comment(self, repo_name, pull_request_id): + assert request.environ.get('HTTP_X_PARTIAL_XHR') pull_request = PullRequest.get_or_404(pull_request_id) status = request.POST.get('changeset_status') @@ -698,9 +699,6 @@ Session().commit() - if not request.environ.get('HTTP_X_PARTIAL_XHR'): - raise HTTPFound(location=pull_request.url()) - data = { 'target_id': h.safeid(h.safe_unicode(request.POST.get('f_path'))), }