Changeset - 5a826060251f
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-07-02 00:59:46
marcin@python-works.com
redirect to pull-request overview after creation
1 file changed with 6 insertions and 5 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/pullrequests.py
Show inline comments
 
@@ -135,18 +135,19 @@ class PullrequestsController(BaseRepoCon
 

	
 
        try:
 
            model = PullRequestModel()
 
            model.create(self.rhodecode_user.user_id, org_repo,
 
            pull_request = model.create(self.rhodecode_user.user_id, org_repo,
 
                         org_ref, other_repo, other_ref, revisions,
 
                         reviewers, title, description)
 
            Session.commit()
 
            h.flash(_('Pull request send'), category='success')
 
            h.flash(_('Successfully opened new pull request'),
 
                    category='success')
 
        except Exception:
 
            raise
 
            h.flash(_('Error occured during sending pull request'),
 
            h.flash(_('Error occurred during sending pull request'),
 
                    category='error')
 
            log.error(traceback.format_exc())
 

	
 
        return redirect(url('changelog_home', repo_name=repo_name))
 
        return redirect(url('pullrequest_show', repo_name=other_repo,
 
                            pull_request_id=pull_request.pull_request_id))
 

	
 
    def _load_compare_data(self, pull_request):
 
        """
0 comments (0 inline, 0 general)