From 3b77c0da8352c631f93c37e363f323a1453e21cc Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 20 Nov 2024 16:38:07 +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 c9b2c2d..865d579 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.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