fix(edge-stacks): update the edge stacks status when removing a tag EE-2432

This commit is contained in:
andres-portainer
2022-02-10 14:35:46 -03:00
parent 9c2dbac479
commit 8667759e5b

View File

@@ -309,6 +309,13 @@ func (handler *Handler) endpointUpdate(w http.ResponseWriter, r *http.Request) *
edgeStackSet[edgeStackID] = true
}
for _, stack := range edgeStacks {
if !edgeStackSet[stack.ID] {
delete(stack.Status, endpoint.ID)
handler.DataStore.EdgeStack().UpdateEdgeStack(stack.ID, &stack)
}
}
relation.EdgeStacks = edgeStackSet
err = handler.DataStore.EndpointRelation().UpdateEndpointRelation(endpoint.ID, relation)