alarms: handle missing last update

This commit is contained in:
Iain Learmonth 2022-04-20 15:56:09 +01:00
parent 45a6d27c8b
commit 0d4296c89c
2 changed files with 8 additions and 1 deletions

View file

@ -20,6 +20,13 @@ def calculate_mirror_expiry(s):
return f"{countdown.days} days"
@portal.app_template_filter("format_datetime")
def format_datetime(s):
if s is None:
return "Unknown"
return s.strftime("%a, %d %b %Y %H:%M:%S")
@portal.route("/")
def portal_home():
return render_template("home.html.j2", section="home")