From 18bf8aad605a129fb3d37b8621123a206587976e Mon Sep 17 00:00:00 2001 From: StageDog Date: Sun, 23 Nov 2025 00:07:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20IsDiscordIdAlreadyTaken=20=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E6=A3=80=E6=9F=A5=E8=BD=AF=E5=88=A0=E9=99=A4=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/user.go b/model/user.go index e2dcf2c9..395daa0b 100644 --- a/model/user.go +++ b/model/user.go @@ -588,7 +588,7 @@ func IsGitHubIdAlreadyTaken(githubId string) bool { } func IsDiscordIdAlreadyTaken(discordId string) bool { - return DB.Where("discord_id = ?", discordId).Find(&User{}).RowsAffected == 1 + return DB.Unscoped().Where("discord_id = ?", discordId).Find(&User{}).RowsAffected == 1 } func IsOidcIdAlreadyTaken(oidcId string) bool {