##// END OF EJS Templates
pull-requests: prevent from errors in generating a title in repositories which have...
marcink -
r2494:fbc4bf4c default
parent child Browse files
Show More
@@ -608,7 +608,8 b' class RepoPullRequestsView(RepoAppView, '
608 try:
608 try:
609 source_repo_data = PullRequestModel().generate_repo_data(
609 source_repo_data = PullRequestModel().generate_repo_data(
610 source_repo, commit_id=commit_id,
610 source_repo, commit_id=commit_id,
611 branch=branch_ref, bookmark=bookmark_ref, translator=self.request.translate)
611 branch=branch_ref, bookmark=bookmark_ref,
612 translator=self.request.translate)
612 except CommitDoesNotExistError as e:
613 except CommitDoesNotExistError as e:
613 log.exception(e)
614 log.exception(e)
614 h.flash(_('Commit does not exist'), 'error')
615 h.flash(_('Commit does not exist'), 'error')
@@ -627,7 +628,8 b' class RepoPullRequestsView(RepoAppView, '
627 default_target_repo, translator=self.request.translate)
628 default_target_repo, translator=self.request.translate)
628
629
629 selected_source_ref = source_repo_data['refs']['selected_ref']
630 selected_source_ref = source_repo_data['refs']['selected_ref']
630
631 title_source_ref = ''
632 if selected_source_ref:
631 title_source_ref = selected_source_ref.split(':', 2)[1]
633 title_source_ref = selected_source_ref.split(':', 2)[1]
632 c.default_title = PullRequestModel().generate_pullrequest_title(
634 c.default_title = PullRequestModel().generate_pullrequest_title(
633 source=source_repo.repo_name,
635 source=source_repo.repo_name,
General Comments 0
You need to be logged in to leave comments. Login now