From 17d285f308684fd65eec63e451f32d3623dbabc7 Mon Sep 17 00:00:00 2001 From: Maxim Podosochnyy <podosochnyy@perx.ru> Date: Tue, 4 Jul 2023 15:17:35 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- perxis/extensions/extension_setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/perxis/extensions/extension_setup.py b/perxis/extensions/extension_setup.py index 65a2bfc..a93e6fc 100644 --- a/perxis/extensions/extension_setup.py +++ b/perxis/extensions/extension_setup.py @@ -118,10 +118,11 @@ class ExtensionSetup: was_found = False for local_rule in cloned_role.rules: + # Если запись с правами доступа на коллекцию найдена - правила нужно совместить if local_rule.collection_id == exist_rule.collection_id: was_found = True - local_rule.actions[:] = list(set(local_rule.actions + exist_rule.actions)) + local_rule.actions[:] = list(set(list(local_rule.actions) + list(exist_rule.actions))) break @@ -129,7 +130,7 @@ class ExtensionSetup: if not was_found: cloned_role.rules.append(common_pb2.Rule( collection_id=exist_rule.collection_id, - actions=exist_rule.actions + actions=list(exist_rule.actions) )) try: -- GitLab