Changeset - 56233b874eba
[Not reviewed]
default
0 1 0
Mads Kiilerich - 7 years ago 2019-03-24 17:57:34
mads@kiilerich.com
pull-request: fix missing imports for delete and close

Problem introduced in 21edd7f16681 - apparently a code path without automated
test coverage.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/changeset.py
Show inline comments
 
@@ -43,12 +43,13 @@ from kallithea.lib.utils import action_l
 
from kallithea.lib.compat import OrderedDict
 
from kallithea.lib import diffs
 
from kallithea.model.db import ChangesetComment, ChangesetStatus
 
from kallithea.model.comment import ChangesetCommentsModel
 
from kallithea.model.changeset_status import ChangesetStatusModel
 
from kallithea.model.meta import Session
 
from kallithea.model.pull_request import PullRequestModel
 
from kallithea.model.repo import RepoModel
 
from kallithea.lib.vcs.backends.base import EmptyChangeset
 
from kallithea.lib.utils2 import safe_unicode
 
from kallithea.lib.graphmod import graph_data
 

	
 
log = logging.getLogger(__name__)
 
@@ -210,15 +211,15 @@ def create_cs_pr_comment(repo_name, revi
 
            ) and not pull_request.is_closed():
 
            PullRequestModel().delete(pull_request)
 
            Session().commit()
 
            h.flash(_('Successfully deleted pull request %s') % pull_request_id,
 
                    category='success')
 
            return {
 
               'location': url('my_pullrequests'), # or repo pr list?
 
               'location': h.url('my_pullrequests'), # or repo pr list?
 
            }
 
            raise HTTPFound(location=url('my_pullrequests')) # or repo pr list?
 
            raise HTTPFound(location=h.url('my_pullrequests')) # or repo pr list?
 
        raise HTTPForbidden()
 

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

	
 
    comment = ChangesetCommentsModel().create(
 
        text=text,
0 comments (0 inline, 0 general)