##// END OF EJS Templates
changelog: prevent from 500 errors on changelog when fetching certain commits.
marcink -
r2151:ebe7e2af default
parent child Browse files
Show More
@@ -308,7 +308,13 b' class RepoChangelogView(RepoAppView):'
308 pre_load = self._get_preload_attrs()
308 pre_load = self._get_preload_attrs()
309
309
310 if f_path:
310 if f_path:
311 base_commit = self.rhodecode_vcs_repo.get_commit(commit_id)
311 try:
312 base_commit = self.rhodecode_vcs_repo.get_commit(commit_id)
313 except (RepositoryError, CommitDoesNotExistError, Exception) as e:
314 log.exception(safe_str(e))
315 raise HTTPFound(
316 h.route_path('repo_changelog', repo_name=self.db_repo_name))
317
312 collection = base_commit.get_file_history(
318 collection = base_commit.get_file_history(
313 f_path, limit=hist_limit, pre_load=pre_load)
319 f_path, limit=hist_limit, pre_load=pre_load)
314 collection = list(reversed(collection))
320 collection = list(reversed(collection))
@@ -330,7 +336,10 b' class RepoChangelogView(RepoAppView):'
330 prev_data = None
336 prev_data = None
331 next_data = None
337 next_data = None
332
338
333 prev_graph = json.loads(self.request.POST.get('graph') or '{}')
339 try:
340 prev_graph = json.loads(self.request.POST.get('graph') or '{}')
341 except json.JSONDecodeError:
342 prev_graph = {}
334
343
335 if self.request.GET.get('chunk') == 'prev':
344 if self.request.GET.get('chunk') == 'prev':
336 next_data = prev_graph
345 next_data = prev_graph
General Comments 0
You need to be logged in to leave comments. Login now