Fix temporary hack

This commit is contained in:
Itay Mizeretz 2018-01-09 19:25:18 +02:00
parent 50c674a2af
commit 1935d2d6a1
1 changed files with 3 additions and 3 deletions

View File

@ -14,9 +14,9 @@ class TelemetryFeed(flask_restful.Resource):
def get(self, **kw):
timestamp = request.args.get('timestamp')
if "null" == timestamp or timestamp is None: # special case to avoid ugly JS code...
timestamp = datetime(2010,1,1).isoformat()
telemetries = mongo.db.telemetry.find({'timestamp': {'$gt': dateutil.parser.parse(timestamp)}})
telemetries = mongo.db.telemetry.find({})
else:
telemetries = mongo.db.telemetry.find({'timestamp': {'$gt': dateutil.parser.parse(timestamp)}})
return \
{