Commit 74116212 authored by Enrico Zini's avatar Enrico Zini
Browse files

Deal with None in median

parent f2875a9a
......@@ -554,7 +554,7 @@ class MailboxStats(VisitorTemplateView):
st["person"] = bmodels.Person.lookup_by_email(email)
st["date_first_py"] = datetime.datetime.fromtimestamp(st["date_first"])
st["date_last_py"] = datetime.datetime.fromtimestamp(st["date_last"])
if "median" not in st:
if "median" not in st or st["median"] is None:
st["median_py"] = None
else:
st["median_py"] = datetime.timedelta(seconds=st["median"])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment