mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 11:47:36 +08:00
[FIX] fix builder service id is empty bug
This commit is contained in:
parent
69750ab5d4
commit
42aeae9c66
@ -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(),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user