workflow partial allows

This commit is contained in:
mr 2025-02-05 17:02:21 +01:00
parent 7201cabb43
commit 88b7cfe2fd

View File

@ -173,7 +173,7 @@ func (a *workflowMongoAccessor) LoadOne(id string) (utils.DBObject, int, error)
return utils.GenericLoadOne[*Workflow](id, func(d utils.DBObject) (utils.DBObject, int, error) {
w := d.(*Workflow)
a.execute(w, false, true) // if no workspace is attached to the workflow, create it
return a.verifyResource(d), 200, nil
return d, 200, nil
}, a)
}
@ -188,7 +188,7 @@ func (a *workflowMongoAccessor) Search(filters *dbs.Filters, search string, isDr
func (a *workflowMongoAccessor) verifyResource(obj utils.DBObject) utils.DBObject {
wf := obj.(*Workflow)
if wf.Graph == nil {
return nil
return wf
}
for _, item := range wf.Graph.Items {
t, resource := item.GetResource()