diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index f3d2386..62bcc9a 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -258,7 +258,7 @@ func (wfa *workflowMongoAccessor) UpdateOne(set utils.DBObject, id string) (util fmt.Println("UPDATE", workflow.ScheduleActive, workflow.Schedule) if workflow.ScheduleActive && workflow.Schedule != nil { // if the workflow is scheduled, update the executions now := time.Now().UTC() - if (workflow.Schedule.End != nil && now.After(*workflow.Schedule.End)) || (workflow.Schedule.End == nil && workflow.Schedule.Start != nil && now.After(*d.Schedule.Start)) { // if the start date is passed, then you can book + 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.GenericRawUpdateOne(workflow, id, wfa) } // if the start date is passed, update the executions