##// 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 commit_id = self.request.matchdict['commit_id']
535 commit_id = self.request.matchdict['commit_id']
536 self.load_default_context()
536 self.load_default_context()
537
537
538 commit = self.rhodecode_vcs_repo.get_commit(commit_id=commit_id)
538 try:
539 result = {"results": commit.children}
539 commit = self.rhodecode_vcs_repo.get_commit(commit_id=commit_id)
540 children = commit.children
541 except CommitDoesNotExistError:
542 children = []
543
544 result = {"results": children}
540 return result
545 return result
541
546
542 @LoginRequired()
547 @LoginRequired()
@@ -549,6 +554,10 b' class RepoCommitsView(RepoAppView):'
549 commit_id = self.request.matchdict['commit_id']
554 commit_id = self.request.matchdict['commit_id']
550 self.load_default_context()
555 self.load_default_context()
551
556
552 commit = self.rhodecode_vcs_repo.get_commit(commit_id=commit_id)
557 try:
553 result = {"results": commit.parents}
558 commit = self.rhodecode_vcs_repo.get_commit(commit_id=commit_id)
559 parents = commit.parents
560 except CommitDoesNotExistError:
561 parents = []
562 result = {"results": parents}
554 return result
563 return result
General Comments 0
You need to be logged in to leave comments. Login now