Changeset - b58113063bb2
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 7 years ago 2018-11-10 21:05:28
thomas.de_schampheleire@nokia.com
controllers: changeset: catch status changes on inline comments

This is a preparation on sharing the same comment method between
pullrequests and changeset controllers.
1 file changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -369,14 +369,21 @@ class ChangesetController(BaseRepoContro
 
        assert request.environ.get('HTTP_X_PARTIAL_XHR')
 

	
 
        status = request.POST.get('changeset_status')
 
        f_path = request.POST.get('f_path')
 
        line_no = request.POST.get('line')
 

	
 
        if status and (f_path or line_no):
 
            # status votes are only possible in general comments
 
            raise HTTPBadRequest()
 

	
 
        text = request.POST.get('text', '').strip()
 

	
 
        c.comment = create_comment(
 
            text,
 
            status,
 
            revision=revision,
 
            f_path=request.POST.get('f_path'),
 
            line_no=request.POST.get('line'),
 
            f_path=f_path,
 
            line_no=line_no,
 
        )
 

	
 
        # get status if set !
0 comments (0 inline, 0 general)