test
This commit is contained in:
parent
57f18b2244
commit
3b77c0da83
@ -253,7 +253,7 @@ func (wfa *workflowMongoAccessor) UpdateOne(set utils.DBObject, id string) (util
|
||||
now := time.Now().UTC()
|
||||
if (workflow.Schedule.End != nil && now.After(*workflow.Schedule.End)) || (workflow.Schedule.End == nil && workflow.Schedule.Start != nil && now.After(*workflow.Schedule.Start)) { // if the start date is passed, then you can book
|
||||
workflow.ScheduleActive = false
|
||||
wfa.GenericUpdateOne(workflow, id, wfa, &Workflow{})
|
||||
wfa.GenericRawUpdateOne(workflow, id, wfa)
|
||||
} // if the start date is passed, update the executions
|
||||
}
|
||||
if !avoid { // if the schedule is not avoided, update the executions
|
||||
@ -277,7 +277,7 @@ func (wfa *workflowMongoAccessor) StoreOne(data utils.DBObject) (utils.DBObject,
|
||||
now := time.Now().UTC()
|
||||
if (workflow.Schedule.End != nil && now.After(*workflow.Schedule.End)) || (workflow.Schedule.End == nil && workflow.Schedule.Start != nil && now.After(*workflow.Schedule.Start)) { // if the start date is passed, then you can book
|
||||
workflow.ScheduleActive = false
|
||||
wfa.GenericUpdateOne(workflow, workflow.UUID, wfa, &Workflow{})
|
||||
wfa.GenericRawUpdateOne(workflow, workflow.UUID, wfa)
|
||||
} // if the start date is passed, update the executions
|
||||
}
|
||||
wfa.share(workflow, false, wfa.Caller) // share the creation to the peers
|
||||
@ -350,7 +350,7 @@ func (wfa *workflowMongoAccessor) LoadOne(id string) (utils.DBObject, int, error
|
||||
now := time.Now().UTC()
|
||||
if (workflow.Schedule.End != nil && now.After(*workflow.Schedule.End)) || (workflow.Schedule.End == nil && workflow.Schedule.Start != nil && now.After(*workflow.Schedule.Start)) { // if the start date is passed, then you can book
|
||||
workflow.ScheduleActive = false
|
||||
wfa.GenericUpdateOne(&workflow, id, wfa, &Workflow{})
|
||||
wfa.GenericRawUpdateOne(&workflow, id, wfa)
|
||||
} // if the start date is passed, update the executions
|
||||
}
|
||||
wfa.execute(&workflow, false, true) // if no workspace is attached to the workflow, create it
|
||||
|
Loading…
Reference in New Issue
Block a user