Skip to content

Commit

Permalink
fix: modify code such that there is no users when create workspace group
Browse files Browse the repository at this point in the history
Signed-off-by: Youngjin Jo <[email protected]>
  • Loading branch information
yjinjo committed Oct 2, 2024
1 parent 4937e26 commit e9f81cf
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/spaceone/identity/service/workspace_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@
from spaceone.identity.manager.project_manager import ProjectManager
from spaceone.identity.manager.resource_manager import ResourceManager
from spaceone.identity.manager.role_binding_manager import RoleBindingManager
from spaceone.identity.manager.service_account_manager import \
ServiceAccountManager
from spaceone.identity.manager.trusted_account_manager import \
TrustedAccountManager
from spaceone.identity.manager.workspace_group_manager import \
WorkspaceGroupManager
from spaceone.identity.manager.service_account_manager import ServiceAccountManager
from spaceone.identity.manager.trusted_account_manager import TrustedAccountManager
from spaceone.identity.manager.workspace_group_manager import WorkspaceGroupManager
from spaceone.identity.manager.workspace_manager import WorkspaceManager
from spaceone.identity.model import Workspace
from spaceone.identity.model.workspace.request import *
Expand Down Expand Up @@ -463,7 +460,7 @@ def _add_workspace_to_group(
is_updatable = False
else:
workspace_group_dict = workspace_group_vo.to_dict()
users = workspace_group_dict.get("users", [])
users = workspace_group_dict.get("users", []) or []
user_ids = [user.get("user_id") for user in users]
self._delete_role_bindings(workspace_id, domain_id, user_ids=user_ids)
self._create_role_bindings(
Expand Down

0 comments on commit e9f81cf

Please sign in to comment.