From 5ccca11b42150ca19ede554bebf97085c4f348c5 Mon Sep 17 00:00:00 2001 From: billybonks Date: Wed, 7 Feb 2024 16:34:00 +0800 Subject: [PATCH] bugfix: dashboard shows ago when less then 1minute --- 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) % {