Skip to content

Commit

Permalink
fix: removing unnecessary images in db too
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0elliot committed Sep 5, 2023
1 parent 4f85cfe commit 0216f85
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion db-connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,9 @@ func sanitizeString(input string) string {
}

func Fixexecution(ctx context.Context, workflowExecution WorkflowExecution) WorkflowExecution {
workflowExecution.Workflow.Image = ""


// Make sure to not having missing items in the execution
lastexecVar := map[string]ActionResult{}
for _, action := range workflowExecution.Workflow.Actions {
Expand Down Expand Up @@ -1260,11 +1263,16 @@ func Fixexecution(ctx context.Context, workflowExecution WorkflowExecution) Work

// Don't forget any!!
extra := 0
for _, trigger := range workflowExecution.Workflow.Triggers {
for triggerIndex, trigger := range workflowExecution.Workflow.Triggers {
if trigger.TriggerType != "SUBFLOW" && trigger.TriggerType != "USERINPUT" {
continue
}

trigger.LargeImage = ""
trigger.SmallImage = ""

workflowExecution.Workflow.Triggers[triggerIndex] = trigger

extra += 1

found := false
Expand Down

0 comments on commit 0216f85

Please sign in to comment.