##// END OF EJS Templates
feed: fix errors on feed access of empty repositories.
milka -
r4665:d9688890 default
parent child Browse files
Show More
@@ -104,6 +104,9 b' class RepoFeedView(RepoAppView):'
104
104
105 def _get_commits(self):
105 def _get_commits(self):
106 pre_load = ['author', 'branch', 'date', 'message', 'parents']
106 pre_load = ['author', 'branch', 'date', 'message', 'parents']
107 if self.rhodecode_vcs_repo.is_empty():
108 return []
109
107 collection = self.rhodecode_vcs_repo.get_commits(
110 collection = self.rhodecode_vcs_repo.get_commits(
108 branch_name=None, show_hidden=False, pre_load=pre_load,
111 branch_name=None, show_hidden=False, pre_load=pre_load,
109 translate_tags=False)
112 translate_tags=False)
@@ -137,6 +140,7 b' class RepoFeedView(RepoAppView):'
137 language=self.language,
140 language=self.language,
138 ttl=self.ttl
141 ttl=self.ttl
139 )
142 )
143
140 for commit in reversed(self._get_commits()):
144 for commit in reversed(self._get_commits()):
141 date = self._set_timezone(commit.date)
145 date = self._set_timezone(commit.date)
142 feed.add_item(
146 feed.add_item(
General Comments 0
You need to be logged in to leave comments. Login now