##// END OF EJS Templates
pull-requests: fix problem with empty instances on creating PR from origin repo
marcink -
r921:a6c745fb default
parent child Browse files
Show More
@@ -298,10 +298,12 b' class PullrequestsController(BaseRepoCon'
298 redirect(url('pullrequest_home', repo_name=source_repo.repo_name))
298 redirect(url('pullrequest_home', repo_name=source_repo.repo_name))
299
299
300 default_target_repo = source_repo
300 default_target_repo = source_repo
301 if (source_repo.parent and
301
302 not source_repo.parent.scm_instance().is_empty()):
302 if source_repo.parent:
303 # change default if we have a parent repo
303 parent_vcs_obj = source_repo.parent.scm_instance()
304 default_target_repo = source_repo.parent
304 if parent_vcs_obj and not parent_vcs_obj.is_empty():
305 # change default if we have a parent repo
306 default_target_repo = source_repo.parent
305
307
306 target_repo_data = PullRequestModel().generate_repo_data(
308 target_repo_data = PullRequestModel().generate_repo_data(
307 default_target_repo)
309 default_target_repo)
@@ -363,7 +365,8 b' class PullrequestsController(BaseRepoCon'
363 add_parent = False
365 add_parent = False
364 if repo.parent:
366 if repo.parent:
365 if filter_query in repo.parent.repo_name:
367 if filter_query in repo.parent.repo_name:
366 if not repo.parent.scm_instance().is_empty():
368 parent_vcs_obj = repo.parent.scm_instance()
369 if parent_vcs_obj and not parent_vcs_obj.is_empty():
367 add_parent = True
370 add_parent = True
368
371
369 limit = 20 - 1 if add_parent else 20
372 limit = 20 - 1 if add_parent else 20
General Comments 0
You need to be logged in to leave comments. Login now