fix: create vm task

Former-commit-id: 62cd00915314b280231809d0b6d7b7cffc1966ee
This commit is contained in:
qiwang 2024-05-13 10:32:15 +08:00
parent e07106841f
commit a48a44a05a
1 changed files with 6 additions and 0 deletions

View File

@ -144,6 +144,12 @@ func (l *CommitVmTaskLogic) CommitVmTask(req *types.CommitVmTaskReq) (resp *type
}*/ }*/
taskVm.Uuid = VmObject.Uuid taskVm.Uuid = VmObject.Uuid
taskVm.Platform = VmObject.Platform taskVm.Platform = VmObject.Platform
taskVm.AdapterId = int64(adapterId)
taskVm.ClusterId, err = strconv.ParseInt(clusterId, 10, 64)
if err != nil {
fmt.Println("Error converting string to int64:", err)
return
}
tx = l.svcCtx.DbEngin.Create(&taskVm) tx = l.svcCtx.DbEngin.Create(&taskVm)
if tx.Error != nil { if tx.Error != nil {
return nil, tx.Error return nil, tx.Error