Skip to content

Commit

Permalink
Merge pull request #3867 from PetrusZ/fix/approval_runtime
Browse files Browse the repository at this point in the history
fix lark approval runtime input bug
  • Loading branch information
jamsman94 authored Dec 3, 2024
2 parents 7d88076 + 0fa5b0b commit 20977c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ func CreateWorkflowTaskV4(args *CreateWorkflowTaskV4Args, workflow *commonmodels
return resp, err
}

if err := createLarkApprovalDefinition(workflow); err != nil {
return resp, errors.Wrap(err, "create lark approval definition")
}

workflow.HookCtls = nil
workflow.JiraHookCtls = nil
workflow.MeegoHookCtls = nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ func CreateWorkflowV4(user string, workflow *commonmodels.WorkflowV4, logger *za
if err := LintWorkflowV4(workflow, logger); err != nil {
return err
}
// lark approval different node type need different approval definition
// check whether lark approvals in workflow need to create lark approval definition
if err := createLarkApprovalDefinition(workflow); err != nil {
return errors.Wrap(err, "create lark approval definition")
}

workflow.CreatedBy = user
workflow.UpdatedBy = user
Expand Down Expand Up @@ -278,11 +273,6 @@ func UpdateWorkflowV4(name, user string, inputWorkflow *commonmodels.WorkflowV4,
}
}
}
// lark approval different node type need different approval definition
// check whether lark approvals in workflow need to create lark approval definition
if err := createLarkApprovalDefinition(inputWorkflow); err != nil {
return errors.Wrap(err, "create lark approval definition")
}

if err := commonrepo.NewWorkflowV4Coll().Update(
workflow.ID.Hex(),
Expand Down

0 comments on commit 20977c8

Please sign in to comment.