From 6632e15816a8b651c353e7118a35b7add8027839 Mon Sep 17 00:00:00 2001 From: Aditya <60684641+0x0elliot@users.noreply.github.com> Date: Sat, 29 Jul 2023 06:30:26 +0530 Subject: [PATCH] fix: fixing opensearch imports for comments https://github.com/Shuffle/Shuffle/issues/1016 --- db-connector.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/db-connector.go b/db-connector.go index 041e9fb..0b06912 100755 --- a/db-connector.go +++ b/db-connector.go @@ -5456,6 +5456,16 @@ func SetWorkflow(ctx context.Context, workflow Workflow, id string, optionalEdit workflow.Created = timeNow } + for actionIndex, _ := range workflow.Comments { + workflow.Comments[actionIndex].Position.X = float64(workflow.Comments[actionIndex].Position.X) + workflow.Comments[actionIndex].Position.Y = float64(workflow.Comments[actionIndex].Position.Y) + } + + for actionIndex, _ := range workflow.Actions { + workflow.Actions[actionIndex].Position.X = float64(workflow.Actions[actionIndex].Position.X) + workflow.Actions[actionIndex].Position.Y = float64(workflow.Actions[actionIndex].Position.Y) + } + if len(optionalEditedSecondsOffset) > 0 { workflow.Edited += int64(optionalEditedSecondsOffset[0]) }