Skip to content

Commit

Permalink
replace with do_nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
yezizp2012 committed Mar 12, 2024
1 parent 27e652f commit f6806ca
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/meta/src/controller/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,18 +296,12 @@ impl CatalogController {
} else {
on_conflict.do_nothing();
}
let res = UserPrivilege::insert(privilege)

UserPrivilege::insert(privilege)
.on_conflict(on_conflict)
.do_nothing()
.exec(&txn)
.await;
if let Err(err) = res {
if !matches!(
err,
sea_orm::DbErr::RecordNotInserted | sea_orm::DbErr::RecordNotUpdated
) {
return Err(err.into());
}
}
.await?;
}

let user_infos = list_user_info_by_ids(user_ids, &txn).await?;
Expand Down

0 comments on commit f6806ca

Please sign in to comment.