Fix user profile writes on postgres conflicts
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user