From cd440b993195073bb3ad3255b9e2621efbf8bff4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 16 Feb 2024 20:59:21 +0100 Subject: [PATCH] fix get role in register_user_dlt --- ereuse_devicehub/modules/dpp/commands/register_user_dlt.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/modules/dpp/commands/register_user_dlt.py b/ereuse_devicehub/modules/dpp/commands/register_user_dlt.py index a40dd0ae..8a40f3b4 100644 --- a/ereuse_devicehub/modules/dpp/commands/register_user_dlt.py +++ b/ereuse_devicehub/modules/dpp/commands/register_user_dlt.py @@ -57,7 +57,7 @@ class RegisterUserDlt: data_eth = json.dumps(ethereum) user.api_keys_dlt = encrypt(password, data_eth) - lroles = [] + roles = [] try: # TODO Not works with app.app_context(): @@ -66,8 +66,7 @@ class RegisterUserDlt: attributes = user.get_abac_attributes() for c in attributes: if 'role' in c.get('attributeURI'): - lrole.append(c.get('attributeValue')) - roles = ",".join(lrole) + roles.append(c.get('attributeValue')) except Exception: roles = ["Operator"]