genlong 7 сар өмнө
parent
commit
8cb955f085

+ 1 - 1
service/auth/wechat.go

@@ -39,7 +39,7 @@ func (wechat WechatAccessToken) GetAccessToken() (accessToken string, err error)
 	wxToken, err := models.GetWxTokenById()
 
 	var isRegister bool
-	if err != nil && err != gorm.ErrRecordNotFound {
+	if err != nil {
 		if err == gorm.ErrRecordNotFound {
 			isRegister = true
 		} else {