diff --git a/server/info/internal/logic/infologic.go b/server/info/internal/logic/infologic.go index 93d63b43..79432e86 100644 --- a/server/info/internal/logic/infologic.go +++ b/server/info/internal/logic/infologic.go @@ -117,7 +117,12 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r sqlstr := fmt.Sprintf("select id, module, %s as querydata from %s where %s ", mquery.EncodeQuery("metadata"), mquery.TableName, cond) var info InfoType - err := l.svcCtx.MysqlConn.Raw(sqlstr).Scan(&info).Error + raw := l.svcCtx.MysqlConn.Raw(sqlstr) + if raw.Error == gorm.ErrRecordNotFound { + continue + } + + err := raw.Scan(&info).Error if err == gorm.ErrRecordNotFound { continue }