From a9b341076af8ad6488e91335cce6e733c2597fd4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 7 Jun 2021 15:48:55 +0200 Subject: [PATCH] fixed --- ereuse_devicehub/resources/action/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/action/schemas.py b/ereuse_devicehub/resources/action/schemas.py index 5106d2b9..dbbc0035 100644 --- a/ereuse_devicehub/resources/action/schemas.py +++ b/ereuse_devicehub/resources/action/schemas.py @@ -592,7 +592,7 @@ class Trade(ActionWithMultipleDevices): data['confirm'] = True return - if not data['confirm'] not data.get('code'): + if not data['confirm'] and not data.get('code'): txt = "you need a code to be able to do the traceability" raise ValidationError(txt)