aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-07-10 11:35:20 +0200
committerneodarz <neodarz@neodarz.net>2019-07-10 11:35:20 +0200
commitfdfa73cf2bdb9801dfd0c50e3514c63442d019b8 (patch)
tree830e614c79446bb5c9f0e26f60cdd59708911ab0
parent869beb6f11bcf151c9f90be36dc7a798d8e2bb2c (diff)
downloadumosapi-fdfa73cf2bdb9801dfd0c50e3514c63442d019b8.tar.xz
umosapi-fdfa73cf2bdb9801dfd0c50e3514c63442d019b8.zip
Fix code style
-rw-r--r--umosapi/api.py1
-rw-r--r--umosapi/app_db/uobject.py8
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