ensure period is always 1+

This commit is contained in:
Damien Elmes 2012-04-27 10:51:13 +09:00
parent 89eea5f964
commit f6b620f9ed

View file

@ -256,7 +256,8 @@ group by day order by day""" % (self._limit(), lim),
if not t:
period = 1
else:
period = (self.col.sched.dayCutoff - (t/1000)) / 86400
period = max(
1, (self.col.sched.dayCutoff - (t/1000)) / 86400)
i = []
self._line(i, _("Days studied"),
_("<b>%(pct)d%%</b> (%(x)s of %(y)s)") % dict(