diff options
-rw-r--r-- | umosapi/api.py | 1 | ||||
-rw-r--r-- | umosapi/app_db/uobject.py | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/umosapi/api.py b/umosapi/api.py index 45bab9c..6ef6ce6 100644 --- a/umosapi/api.py +++ b/umosapi/api.py @@ -75,7 +75,6 @@ class Objects(Resource): return {"msg": status['msg']}, status['code'] - @api.doc(params={'_id': '5d244cc13f3d46cb739912ae'}) def delete(self, _id): """ Remove an uobject """ diff --git a/umosapi/app_db/uobject.py b/umosapi/app_db/uobject.py index 00aa9b7..78b8bc8 100644 --- a/umosapi/app_db/uobject.py +++ b/umosapi/app_db/uobject.py @@ -60,9 +60,13 @@ class UObject(object): "code": 404 } - datas = dict(("datas.{}".format(key), value) for (key, value) in datas.items()) + datas = dict( + ("datas.{}".format(key), value) for (key, value) in datas.items() + ) if not error: - mongo.db.uobjects.update_one({"_id": ObjectId(_id)}, {"$set": datas}) + mongo.db.uobjects.update_one( + {"_id": ObjectId(_id)}, {"$set": datas} + ) return {"msg": "UObject updated.", "code": 200} return error |