Commit cbef6282 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Workflow: make sure not create duplicate permissions

Fix a problem introduced in ff624fd2 (ERP5Workflow: newly added
permission should be acquired for all existing states., 2024-11-04),
visible in a test failure
parent 3a9b16d4
......@@ -1446,9 +1446,9 @@ class Workflow(XMLObject):
# Add/remove the added/removed Workflow permissions to each state
for state in self.getStateValueList():
state.setAcquirePermissionList(
[e for e in state.getAcquirePermissionList() if e in permission_list] + \
list(set(permission_list) - set(current_permission_list))
)
list(
{e for e in state.getAcquirePermissionList() if e in permission_list}
| (set(permission_list) - set(current_permission_list))))
permission_role_list_dict = state.getStatePermissionRoleListDict()
state.setStatePermissionRoleListDict({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment