Commit fea6f17e by creamlike1024

fix: GetMaxUserId use Unscope, close #987

parent f77a153e
...@@ -108,7 +108,7 @@ func CheckUserExistOrDeleted(username string, email string) (bool, error) { ...@@ -108,7 +108,7 @@ func CheckUserExistOrDeleted(username string, email string) (bool, error) {
func GetMaxUserId() int { func GetMaxUserId() int {
var user User var user User
DB.Last(&user) DB.Unscoped().Last(&user)
return user.Id return user.Id
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment