some
This commit is contained in:
@@ -26,7 +26,7 @@ func (wfa *Booking) CheckBooking(id string, start time.Time, end *time.Time) (bo
|
||||
return true, nil
|
||||
}
|
||||
e := *end
|
||||
accessor := New()
|
||||
accessor := New(tools.BOOKING, "", nil, nil)
|
||||
res, code, err := accessor.Search(&dbs.Filters{
|
||||
And: map[string][]dbs.Filter{ // check if there is a booking on the same compute resource by filtering on the compute_resource_id, the state and the execution date
|
||||
"compute_resource_id": {{Operator: dbs.EQUAL.String(), Value: id}},
|
||||
@@ -54,7 +54,5 @@ func (d *Booking) GetName() string {
|
||||
}
|
||||
|
||||
func (d *Booking) GetAccessor(peerID string, groups []string, caller *tools.HTTPCaller) utils.Accessor {
|
||||
data := New() // Create a new instance of the accessor
|
||||
data.Init(tools.BOOKING, peerID, groups, caller) // Initialize the accessor with the BOOKING model type
|
||||
return data
|
||||
return New(tools.BOOKING, peerID, groups, caller) // Create a new instance of the accessor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user