book in workflow

This commit is contained in:
mr 2024-08-08 17:00:44 +02:00
parent 8dc009564a
commit 2ae15c720a

View File

@ -10,6 +10,7 @@ import (
"cloud.o-forge.io/core/oc-lib/models/resources"
"cloud.o-forge.io/core/oc-lib/models/resources/workflow/graph"
"cloud.o-forge.io/core/oc-lib/models/utils"
"cloud.o-forge.io/core/oc-lib/models/workflow_execution"
"go.mongodb.org/mongo-driver/bson/primitive"
)
@ -56,8 +57,7 @@ func (d *Workflow) CheckBooking() bool {
},
}
}
res, code, err := d.GetAccessor().Search(&f, "")
fmt.Println("res", res, f, code, err)
res, _, _ := (&workflow_execution.WorkflowExecution{}).GetAccessor().Search(&f, "")
return len(res) == 0
}
return true