From fdfa73cf2bdb9801dfd0c50e3514c63442d019b8 Mon Sep 17 00:00:00 2001 From: neodarz Date: Wed, 10 Jul 2019 11:35:20 +0200 Subject: Fix code style --- umosapi/api.py | 1 - 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 -- cgit v1.2.1