mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-04-01 02:42:49 -05:00
Adjust deleting records
Signed-off-by: BlackDex <black.dex@gmail.com>
This commit is contained in:
parent
391d3fe87c
commit
f4130f7d6a
2 changed files with 4 additions and 4 deletions
|
@ -954,10 +954,10 @@ async fn send_invite(org_id: &str, data: Json<InviteData>, headers: AdminHeaders
|
|||
{
|
||||
// Upon error delete the user, invite and org member records when needed
|
||||
if user_created {
|
||||
Invitation::take(email, &mut conn).await;
|
||||
user.delete(&mut conn).await?;
|
||||
} else {
|
||||
new_member.delete(&mut conn).await?;
|
||||
}
|
||||
new_member.delete(&mut conn).await?;
|
||||
|
||||
err!(format!("Error sending invite: {e:?} "));
|
||||
};
|
||||
|
|
|
@ -135,10 +135,10 @@ async fn ldap_import(data: Json<OrgImportData>, token: PublicToken, mut conn: Db
|
|||
{
|
||||
// Upon error delete the user, invite and org member records when needed
|
||||
if user_created {
|
||||
Invitation::take(&user_data.email.clone(), &mut conn).await;
|
||||
user.delete(&mut conn).await?;
|
||||
} else {
|
||||
new_member.delete(&mut conn).await?;
|
||||
}
|
||||
new_member.delete(&mut conn).await?;
|
||||
|
||||
err!(format!("Error sending invite: {e:?} "));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue