From 38143f4065757da52affbc761d378f7ee47d639d Mon Sep 17 00:00:00 2001 From: abdessamad-el Date: Mon, 29 May 2023 18:01:59 +0200 Subject: [PATCH] display 0 minutes ago on dashboard when event is less than 1 minute old --- core/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/utils.py b/core/utils.py index 71f0e164..9acfc014 100644 --- a/core/utils.py +++ b/core/utils.py @@ -38,7 +38,7 @@ def duration_string(duration, precision="s"): duration = "" if h > 0: 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 != "": duration += ", " duration += ngettext("%(minutes)s minute", "%(minutes)s minutes", m) % {