alarms: handle missing last update
This commit is contained in:
parent
45a6d27c8b
commit
0d4296c89c
2 changed files with 8 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue