Minor fix for Gitops Notifier (#2426)
Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
This commit is contained in:
parent
4782126543
commit
aa4f1e2828
|
@ -105,7 +105,9 @@ func GitOpsNotificationHandler(ctx context.Context, clusterInfo model.ClusterIde
|
|||
log.Print("Could not get workflow :", err)
|
||||
return "could not get workflow", err
|
||||
}
|
||||
|
||||
if len(workflows) == 0 {
|
||||
return "", errors.New("no such workflow found")
|
||||
}
|
||||
resKind := gjson.Get(workflows[0].WorkflowManifest, "kind").String()
|
||||
if strings.ToLower(resKind) == "cronworkflow" { // no op
|
||||
return "Request Acknowledged for workflowID: " + workflowID, nil
|
||||
|
|
Loading…
Reference in New Issue