You've already forked AstralRinth
forked from didirus/AstralRinth
Fix two database errors (#3483)
* Fixes error when an admin tries transferring project ownership * Fixes error when trying to delete a user when they previously have a transaction Co-authored-by: Jai Agrawal <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
@@ -657,6 +657,18 @@ impl User {
|
||||
.execute(&mut **transaction)
|
||||
.await?;
|
||||
|
||||
sqlx::query!(
|
||||
"
|
||||
UPDATE charges
|
||||
SET user_id = $1
|
||||
WHERE user_id = $2
|
||||
",
|
||||
deleted_user as UserId,
|
||||
id as UserId,
|
||||
)
|
||||
.execute(&mut **transaction)
|
||||
.await?;
|
||||
|
||||
sqlx::query!(
|
||||
"
|
||||
DELETE FROM user_backup_codes
|
||||
|
||||
Reference in New Issue
Block a user