display 0 minutes ago on dashboard when event is less than 1 minute old

This commit is contained in:
abdessamad-el 2023-05-29 18:01:59 +02:00 committed by Christopher Charbonneau Wells
parent c593fa94c1
commit 38143f4065
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ def duration_string(duration, precision="s"):
duration = "" duration = ""
if h > 0: if h > 0:
duration = ngettext("%(hours)s hour", "%(hours)s hours", h) % {"hours": h} duration = ngettext("%(hours)s hour", "%(hours)s hours", h) % {"hours": h}
if m > 0 and precision != "h": if m >= 0 and precision != "h":
if duration != "": if duration != "":
duration += ", " duration += ", "
duration += ngettext("%(minutes)s minute", "%(minutes)s minutes", m) % { duration += ngettext("%(minutes)s minute", "%(minutes)s minutes", m) % {