##// END OF EJS Templates
hovercards: handle empty repository
marcink -
r4132:ca85e1b2 default
parent child Browse files
Show More
@@ -34,7 +34,7 b' from rhodecode.lib.codeblocks import fil'
34 34 from rhodecode.lib.index import searcher_from_config
35 35 from rhodecode.lib.utils2 import safe_unicode, str2bool, safe_int
36 36 from rhodecode.lib.ext_json import json
37 from rhodecode.lib.vcs.exceptions import CommitDoesNotExistError
37 from rhodecode.lib.vcs.exceptions import CommitDoesNotExistError, EmptyRepositoryError
38 38 from rhodecode.lib.vcs.nodes import FileNode
39 39 from rhodecode.model.db import (
40 40 func, true, or_, case, in_filter_generator, Repository, RepoGroup, User, UserGroup, PullRequest)
@@ -102,8 +102,9 b' class HoverCardsRepoView(RepoAppView):'
102 102 commit_id = self.request.matchdict['commit_id']
103 103 pre_load = ['author', 'branch', 'date', 'message']
104 104 try:
105 c.commit = self.rhodecode_vcs_repo.get_commit(commit_id=commit_id, pre_load=pre_load)
106 except CommitDoesNotExistError:
105 c.commit = self.rhodecode_vcs_repo.get_commit(
106 commit_id=commit_id, pre_load=pre_load)
107 except (CommitDoesNotExistError, EmptyRepositoryError):
107 108 raise HTTPNotFound()
108 109
109 110 return self._get_template_context(c)
General Comments 0
You need to be logged in to leave comments. Login now