fix bug
Signed-off-by: jagger <cossjie@foxmail.com> Former-commit-id: f8d094ff122700a414fa4dbca9ec484985192779
This commit is contained in:
parent
0e479bba2b
commit
c8a3734d74
|
@ -120,7 +120,7 @@ func (s *AiStorage) SaveAiTask(taskId int64, option *option.AiOption, clusterId
|
||||||
ClusterId: cId,
|
ClusterId: cId,
|
||||||
ClusterName: clusterName,
|
ClusterName: clusterName,
|
||||||
Name: option.TaskName,
|
Name: option.TaskName,
|
||||||
Replica: int64(option.Replica),
|
Replica: int64(option.Replica),
|
||||||
JobId: jobId,
|
JobId: jobId,
|
||||||
TaskType: option.TaskType,
|
TaskType: option.TaskType,
|
||||||
Strategy: option.StrategyName,
|
Strategy: option.StrategyName,
|
||||||
|
@ -218,7 +218,7 @@ func (s *AiStorage) SaveClusterResources(clusterId string, clusterName string, c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *AiStorage) UpdateClusterResources(clusterResource *models.TClusterResource) error {
|
func (s *AiStorage) UpdateClusterResources(clusterResource *models.TClusterResource) error {
|
||||||
tx := s.DbEngin.Updates(clusterResource)
|
tx := s.DbEngin.Model(clusterResource).Updates(clusterResource)
|
||||||
if tx.Error != nil {
|
if tx.Error != nil {
|
||||||
return tx.Error
|
return tx.Error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue