diff --git a/models/workflow/workflow.go b/models/workflow/workflow.go index ee7f7d1..0ea3a40 100644 --- a/models/workflow/workflow.go +++ b/models/workflow/workflow.go @@ -4,7 +4,6 @@ import ( "encoding/json" "errors" "fmt" - "slices" "strings" "time" @@ -25,10 +24,10 @@ type AbstractWorkflow struct { } func (w *AbstractWorkflow) isDCLink(link graph.GraphLink) (bool, string) { - if slices.Contains(w.Datacenters, link.Source.ID) { + if d, ok := w.Graph.Items[link.Source.ID]; ok && d.Datacenter != nil { return true, link.Source.ID } - if slices.Contains(w.Datacenters, link.Destination.ID) { + if d, ok := w.Graph.Items[link.Destination.ID]; ok && d.Datacenter != nil { return true, link.Destination.ID } return false, ""