From 57f18b2244436e0693f90865ad18f69b6a4b1d5b Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 20 Nov 2024 16:08:54 +0100 Subject: [PATCH] test --- models/workflow/workflow_mongo_accessor.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index 8cc7d50..c9b2c2d 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -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.UpdateOne(workflow, id) + wfa.GenericUpdateOne(workflow, id, wfa, &Workflow{}) } // 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.UpdateOne(workflow, workflow.UUID) + wfa.GenericUpdateOne(workflow, workflow.UUID, wfa, &Workflow{}) } // 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.UpdateOne(&workflow, id) + wfa.GenericUpdateOne(&workflow, id, wfa, &Workflow{}) } // if the start date is passed, update the executions } wfa.execute(&workflow, false, true) // if no workspace is attached to the workflow, create it