1
0
Fork 0
mirror of https://github.com/koniu/recoll-webui.git synced 2025-10-06 12:00:11 +02:00

Guard against empty doc fmtime field

This commit is contained in:
Jean-Francois Dockes 2014-07-08 15:12:11 +02:00
parent 788061bdd8
commit 600545454c

View file

@ -84,6 +84,8 @@ def select(ls, invalid=[None]):
return value
def timestr(secs, fmt):
if secs == '' or secs is None:
secs = '0'
t = time.gmtime(int(secs))
return time.strftime(fmt, t)