diff --git a/builder/exector/build_from_image_run.go b/builder/exector/build_from_image_run.go index b5ecf3895..93763e255 100644 --- a/builder/exector/build_from_image_run.go +++ b/builder/exector/build_from_image_run.go @@ -64,6 +64,7 @@ func NewImageBuildItem(in []byte) *ImageBuildItem { Namespace: gjson.GetBytes(in, "namespace").String(), TenantName: gjson.GetBytes(in, "tenant_name").String(), ServiceAlias: gjson.GetBytes(in, "service_alias").String(), + ServiceID: gjson.GetBytes(in, "service_id").String(), Image: gjson.GetBytes(in, "image").String(), DeployVersion: gjson.GetBytes(in, "deploy_version").String(), HubUser: gjson.GetBytes(in, "user").String(), diff --git a/db/mysql/dao/version.go b/db/mysql/dao/version.go index 2d5291005..29e5c997f 100644 --- a/db/mysql/dao/version.go +++ b/db/mysql/dao/version.go @@ -91,9 +91,6 @@ func (c *VersionInfoDaoImpl) GetVersionByEventID(eventID string) (*model.Version func (c *VersionInfoDaoImpl) GetVersionByDeployVersion(version, serviceID string) (*model.VersionInfo, error) { var result model.VersionInfo if err := c.DB.Where("build_version =? and service_id = ?", version, serviceID).Find(&result).Error; err != nil { - if err == gorm.ErrRecordNotFound { - return nil, err - } return nil, err } return &result, nil