mongo wants ObjectIds
This commit is contained in:
parent
f2c2e2d6f2
commit
5b85dfa4e5
@ -87,7 +87,7 @@ def tracked():
|
|||||||
|
|
||||||
@app.route('/tracked/<id>')
|
@app.route('/tracked/<id>')
|
||||||
def tracked_view(id):
|
def tracked_view(id):
|
||||||
doc = client.db.tracked.find_one({'_id': id})
|
doc = client.db.tracked.find_one({'_id': pymongo.objectid.ObjectId(id)})
|
||||||
return json.dumps(doc, cls=JSONEncoder)
|
return json.dumps(doc, cls=JSONEncoder)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user