| @@ -34,8 +34,7 @@ func ToCloudBrain(task *models.Cloudbrain) *api.Cloudbrain { | |||||
| StartTime: int64(task.StartTime), | StartTime: int64(task.StartTime), | ||||
| EndTime: int64(task.EndTime), | EndTime: int64(task.EndTime), | ||||
| Spec: ToSpecification(task.Spec), | |||||
| Spec: ToSpecification(task.Spec), | |||||
| } | } | ||||
| } | } | ||||
| func ToAttachment(attachment *models.Attachment) *api.AttachmentShow { | func ToAttachment(attachment *models.Attachment) *api.AttachmentShow { | ||||
| @@ -89,6 +88,9 @@ func ToDataset(dataset *models.Dataset) *api.Dataset { | |||||
| } | } | ||||
| func ToSpecification(s *models.Specification) *api.SpecificationShow { | func ToSpecification(s *models.Specification) *api.SpecificationShow { | ||||
| if s == nil { | |||||
| return nil | |||||
| } | |||||
| return &api.SpecificationShow{ | return &api.SpecificationShow{ | ||||
| ID: s.ID, | ID: s.ID, | ||||
| AccCardsNum: s.AccCardsNum, | AccCardsNum: s.AccCardsNum, | ||||