Fix user profile writes on postgres conflicts

This commit is contained in:
IanShaw027
2026-04-21 10:13:28 -07:00
parent 0f4a8d7be8
commit 525a320424
7 changed files with 104 additions and 9 deletions

View File

@@ -916,6 +916,11 @@ func (s *AuthService) ensureEmailAuthIdentity(ctx context.Context, user *User, s
).
DoNothing().
Exec(ctx); err != nil {
if isSQLNoRowsError(err) {
err = nil
}
}
if err != nil {
logger.LegacyPrintf("service.auth", "[Auth] Failed to ensure email auth identity: user_id=%d email=%s err=%v", user.ID, email, err)
return nil, false
}