Changeset - aee1f11faa8c
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 7 years ago 2018-11-16 21:45:21
thomas.de_schampheleire@nokia.com
controllers: pullrequests: comments are always using AJAX

This is preparation to align commenting on changeset and pullrequests.
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -629,12 +629,13 @@ class PullrequestsController(BaseRepoCon
 
        return render('/pullrequests/pullrequest_show.html')
 

	
 
    @LoginRequired()
 
    @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')
 
        close_pr = request.POST.get('save_close')
 
        delete = request.POST.get('save_delete')
 
        f_path = request.POST.get('f_path')
 
@@ -695,15 +696,12 @@ class PullrequestsController(BaseRepoCon
 
            action_logger(request.authuser,
 
                          'user_closed_pull_request:%s' % pull_request_id,
 
                          c.db_repo, request.ip_addr)
 

	
 
        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'))),
 
        }
 
        if comment is not None:
 
            c.comment = comment
 
            data.update(comment.get_dict())
0 comments (0 inline, 0 general)