Skip to content

Commit

Permalink
fix: modify exclude_unset option and database index
Browse files Browse the repository at this point in the history
Signed-off-by: Youngjin Jo <[email protected]>
  • Loading branch information
yjinjo committed Sep 26, 2024
1 parent f312f31 commit 686ceff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/spaceone/identity/manager/role_binding_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ def __init__(self, *args, **kwargs):

def create_role_binding(self, params: dict) -> RoleBinding:
def _rollback(vo: RoleBinding):
_LOGGER.info(
f"[create_role_binding._rollback] "
f"Delete trusted service account: {vo.role_binding_id}"
)
_LOGGER.info(f"[create_role_binding._rollback]: {vo.role_binding_id}")
vo.delete()

role_binding_vo = self.role_binding_model.create(params)
Expand Down
2 changes: 1 addition & 1 deletion src/spaceone/identity/model/workspace_group/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ class WorkspaceGroup(MongoModel):
"change_query_keys": {},
"ordering": ["name"],
"indexes": [
"workspace_group_id",
"name",
],
}
2 changes: 1 addition & 1 deletion src/spaceone/identity/service/workspace_group_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def add_users(
params.users = old_users_in_workspace_group + new_users_in_workspace_group

workspace_group_vo = self.workspace_group_mgr.update_workspace_group_by_vo(
params.dict(exclude_unset=False), workspace_group_vo
params.dict(exclude_unset=True), workspace_group_vo
)

workspace_group_info = self.add_user_name_and_state_to_users(
Expand Down

0 comments on commit 686ceff

Please sign in to comment.