Skip to content

Commit

Permalink
iam:fix role.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl committed Nov 16, 2023
1 parent 0cabcc8 commit 39da8e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion support/iam/src/basic/serv/iam_role_serv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,13 @@ impl RbumItemCrudOperation<iam_role::ActiveModel, IamRoleAddReq, IamRoleModifyRe
extend_role_id: Some(id.to_string()),
..Default::default()
},None,None,funs,ctx).await?;
let ctx_clone = ctx.clone();
ctx.add_async_task(Box::new(|| {
Box::pin(async move {
let task_handle = tokio::spawn(async move {
let funs = iam_constants::get_tardis_inst();
for role_id in sub_role {
Self::delete_item_with_all_rels(&role_id, &funs, ctx).await?;
let _ = Self::delete_item_with_all_rels(&role_id, &funs, &ctx_clone).await;
}
});
task_handle.await.unwrap();
Expand Down

0 comments on commit 39da8e8

Please sign in to comment.