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:05:36 +02:00
parent 40a61387b9
commit e7a71188a3

View File

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