Merge pull request #2071 from gravitl/GRA-1277-public-keys

skip legacy nodes when setting node.Action
This commit is contained in:
dcarns 2023-03-20 15:03:58 -04:00 committed by GitHub
commit 3119170797
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -598,10 +598,13 @@ func networkNodesUpdateAction(networkName string, action string) error {
return err
}
for _, value := range collections {
for k, value := range collections {
var node models.Node
err := json.Unmarshal([]byte(value), &node)
if err != nil {
if IsLegacyNode(k) { // ignore legacy nodes
continue
}
fmt.Println("error in node address assignment!")
return err
}