From eab0400124fbd4197a950615fa6447c327266002 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 7 Jul 2021 11:06:07 +0200 Subject: [PATCH] open of security --- ereuse_devicehub/resources/action/views/views.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ereuse_devicehub/resources/action/views/views.py b/ereuse_devicehub/resources/action/views/views.py index 5e5d9945..23fdefc0 100644 --- a/ereuse_devicehub/resources/action/views/views.py +++ b/ereuse_devicehub/resources/action/views/views.py @@ -197,11 +197,16 @@ class ActionView(View): snapshot = SnapshotView(json, resource_def, self.schema) return snapshot.post() - if not 'data' in json: - txt = 'Invalid snapshot' - raise ValidationError(txt) + # TODO @cayop uncomment at four weeks + # if not 'data' in json: + # txt = 'Invalid snapshot' + # raise ValidationError(txt) - snapshot_data = decode_snapshot(json) + # snapshot_data = decode_snapshot(json) + + snapshot_data = json + if 'data' in json: + snapshot_data = decode_snapshot(json) if not snapshot_data: txt = 'Invalid snapshot'