From c7abf29706e766ac632b7818ea0da742053bd1e4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 16 Oct 2020 16:24:48 +0200 Subject: [PATCH] clean all previus modifications --- ereuse_devicehub/resources/action/views.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ereuse_devicehub/resources/action/views.py b/ereuse_devicehub/resources/action/views.py index f96d50c7..689cb942 100644 --- a/ereuse_devicehub/resources/action/views.py +++ b/ereuse_devicehub/resources/action/views.py @@ -70,9 +70,6 @@ class ActionView(View): return self.transfer_ownership() Model = db.Model._decl_class_registry.data[json['type']]() action = Model(**a) - if hasattr(action, 'devices'): - for d in action.devices: - d.updated = datetime.now() db.session.add(action) db.session().final_flush() ret = self.schema.jsonify(action) @@ -146,8 +143,6 @@ class ActionView(View): if snapshot.device.hid is None: snapshot.severity = Severity.Warning db.session.add(snapshot) - for action in snapshot.actions: - action.device.updated = datetime.now() db.session().final_flush() ret = self.schema.jsonify(snapshot) # transform it back ret.status_code = 201