##// END OF EJS Templates
fixes #98 protection against float division of percentage stats
marcink -
r935:5e8c7d78 beta
parent child Browse files
Show More
@@ -285,7 +285,7 b' class ReposController(BaseController):'
285
285
286 c.repo_last_rev = r.revisions[-1] if r.revisions else 0
286 c.repo_last_rev = r.revisions[-1] if r.revisions else 0
287
287
288 if last_rev == 0:
288 if last_rev == 0 or c.repo_last_rev == 0:
289 c.stats_percentage = 0
289 c.stats_percentage = 0
290 else:
290 else:
291 c.stats_percentage = '%.2f' % ((float((last_rev)) /
291 c.stats_percentage = '%.2f' % ((float((last_rev)) /
General Comments 0
You need to be logged in to leave comments. Login now