##// END OF EJS Templates
fixed error for empty revisions on admin repo edit
marcink -
r711:cda88b3e beta
parent child Browse files
Show More
@@ -231,7 +231,7 b' class ReposController(BaseController):'
231 try:
231 try:
232 ScmModel().mark_for_invalidation(repo_name)
232 ScmModel().mark_for_invalidation(repo_name)
233 except Exception, e:
233 except Exception, e:
234 h.flash(_('An error occured during cache invalidation'),
234 h.flash(_('An error occurred during cache invalidation'),
235 category='error')
235 category='error')
236 return redirect(url('edit_repo', repo_name=repo_name))
236 return redirect(url('edit_repo', repo_name=repo_name))
237
237
@@ -251,7 +251,9 b' class ReposController(BaseController):'
251 else:
251 else:
252 last_rev = 0
252 last_rev = 0
253 c.stats_revision = last_rev
253 c.stats_revision = last_rev
254 c.repo_last_rev = ScmModel().get(repo_name).revisions[-1]
254 r = ScmModel().get(repo_name)
255 c.repo_last_rev = r.revisions[-1] if r.revisions else 0
256
255 if last_rev == 0:
257 if last_rev == 0:
256 c.stats_percentage = 0
258 c.stats_percentage = 0
257 else:
259 else:
General Comments 0
You need to be logged in to leave comments. Login now