mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-06 06:06:50 +08:00
fix: issue where workflow template labels did not work
This commit is contained in:
@@ -456,6 +456,7 @@ func (c *Client) CreateWorkflowTemplateVersion(namespace string, workflowTemplat
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workflowTemplate.WorkflowTemplateVersionId = workflowTemplateVersionId
|
||||||
latest, err := c.getArgoWorkflowTemplate(namespace, workflowTemplate.UID, "latest")
|
latest, err := c.getArgoWorkflowTemplate(namespace, workflowTemplate.UID, "latest")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
|
@@ -91,13 +91,8 @@ func (s *WorkflowTemplateServer) CreateWorkflowTemplateVersion(ctx context.Conte
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(workflowTemplate.Labels) != 0 {
|
if _, err := client.InsertLabels(v1.TypeWorkflowTemplateVersion, workflowTemplate.WorkflowTemplateVersionId, workflowTemplate.Labels); err != nil {
|
||||||
_, err = client.InsertLabelsBuilder(v1.TypeWorkflowTemplateVersion, workflowTemplate.ID, workflowTemplate.Labels).
|
return nil, err
|
||||||
RunWith(client.DB).
|
|
||||||
Exec()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
req.WorkflowTemplate.Uid = workflowTemplate.UID
|
req.WorkflowTemplate.Uid = workflowTemplate.UID
|
||||||
|
Reference in New Issue
Block a user