##// END OF EJS Templates
commits: add protection against 500 errors on commit children/parents page.
marcink -
r2150:82423302 default
parent child Browse files
Show More
@@ -535,8 +535,13 b' class RepoCommitsView(RepoAppView):'
535 535 commit_id = self.request.matchdict['commit_id']
536 536 self.load_default_context()
537 537
538 try:
538 539 commit = self.rhodecode_vcs_repo.get_commit(commit_id=commit_id)
539 result = {"results": commit.children}
540 children = commit.children
541 except CommitDoesNotExistError:
542 children = []
543
544 result = {"results": children}
540 545 return result
541 546
542 547 @LoginRequired()
@@ -549,6 +554,10 b' class RepoCommitsView(RepoAppView):'
549 554 commit_id = self.request.matchdict['commit_id']
550 555 self.load_default_context()
551 556
557 try:
552 558 commit = self.rhodecode_vcs_repo.get_commit(commit_id=commit_id)
553 result = {"results": commit.parents}
559 parents = commit.parents
560 except CommitDoesNotExistError:
561 parents = []
562 result = {"results": parents}
554 563 return result
General Comments 0
You need to be logged in to leave comments. Login now