fix: GetMaxUserId use Unscope, close #987
This commit is contained in:
1 parent
f77a153e6c
commit
fea6f17e80
1 file changed
+1
-1
+1
-1
@@ -108,7 +108,7 @@ func CheckUserExistOrDeleted(username string, email string) (bool, error) {
|
||||
|
||||
func GetMaxUserId() int {
|
||||
var user User
|
||||
DB.Last(&user)
|
||||
DB.Unscoped().Last(&user)
|
||||
return user.Id
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user