changed the value used as the key in the related map, using the 'node id' was erasing some relations when a a processing is linked to two storages

This commit is contained in:
pb 2025-08-08 16:15:53 +02:00
parent e7a71188a3
commit f4b0cf5683

View File

@ -110,13 +110,11 @@ func (w *Workflow) GetByRelatedProcessing(processingID string, g func(item graph
_, node = item.GetResource() // we are looking for the storage as destination
}
if processingID == nodeID && node != nil { // if the storage is linked to the processing
if _, ok := related[node.GetID()]; !ok {
related[processingID] = Related{}
}
rel := related[node.GetID()]
relID := node.GetID()
rel := Related{}
rel.Node = node
rel.Links = append(rel.Links, link)
related[node.GetID()] = rel
related[relID] = rel
}
}
return related