mirror of
https://github.com/koniu/recoll-webui.git
synced 2025-10-06 03:50:09 +02:00
Guard against empty doc fmtime field
This commit is contained in:
parent
788061bdd8
commit
600545454c
1 changed files with 2 additions and 0 deletions
2
webui.py
2
webui.py
|
@ -84,6 +84,8 @@ def select(ls, invalid=[None]):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def timestr(secs, fmt):
|
def timestr(secs, fmt):
|
||||||
|
if secs == '' or secs is None:
|
||||||
|
secs = '0'
|
||||||
t = time.gmtime(int(secs))
|
t = time.gmtime(int(secs))
|
||||||
return time.strftime(fmt, t)
|
return time.strftime(fmt, t)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue