Handle time vs ts field in data
This commit is contained in:
parent
6eea7f1965
commit
66dc57dc45
|
@ -198,6 +198,12 @@ def query_results(request, size=None):
|
||||||
element["id"] = item["_id"]
|
element["id"] = item["_id"]
|
||||||
|
|
||||||
# Split the timestamp into date and time
|
# Split the timestamp into date and time
|
||||||
|
if "ts" not in element:
|
||||||
|
if "time" in element: # will fix data later
|
||||||
|
ts = element["time"]
|
||||||
|
del element["time"]
|
||||||
|
element["ts"] = ts
|
||||||
|
if "ts" in element:
|
||||||
ts = element["ts"]
|
ts = element["ts"]
|
||||||
ts_spl = ts.split("T")
|
ts_spl = ts.split("T")
|
||||||
date = ts_spl[0]
|
date = ts_spl[0]
|
||||||
|
|
Loading…
Reference in New Issue