changeset 1529:de7e468e2d44

browser (template): fix use of `auto*` in `date_fmt`
author Goffi <goffi@goffi.org>
date Thu, 08 Jun 2023 23:32:46 +0200
parents 66c1a90da1bc
children b338c31d5251
files libervia/web/pages/_browser/template.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/web/pages/_browser/template.py	Thu Jun 08 23:32:45 2023 +0200
+++ b/libervia/web/pages/_browser/template.py	Thu Jun 08 23:32:46 2023 +0200
@@ -40,7 +40,7 @@
 
 
 gidx = Indexer()
-# suffix use to avoid collision with IDs generated in static page
+# suffix used to avoid collision with IDs generated in static page
 SCRIPT_SUFF = "__script__"
 
 def escape_html(txt):
@@ -163,7 +163,7 @@
         limit = moment().startOf('day').subtract(auto_limit, 'days')
         m_fmt = auto_old_fmt if date < limit else auto_new_fmt
 
-    if fmt == "short":
+    elif fmt == "short":
         m_fmt = "DD/MM/YY" if date_only else "DD/MM/YY HH:mm"
     elif fmt == "medium":
         m_fmt = "ll" if date_only else "lll"