mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 05:04:27 +08:00
add migration for extclient tags
This commit is contained in:
parent
4c14cfd099
commit
75307cb726
2 changed files with 10 additions and 1 deletions
|
@ -227,6 +227,13 @@ func updateNodes() {
|
|||
}
|
||||
}
|
||||
}
|
||||
extclients, _ := logic.GetAllExtClients()
|
||||
for _, extclient := range extclients {
|
||||
if extclient.Tags == nil {
|
||||
extclient.Tags = make(map[models.TagID]struct{})
|
||||
logic.SaveExtClient(&extclient)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func removeInterGw(egressRanges []string) ([]string, bool) {
|
||||
|
|
|
@ -50,7 +50,9 @@ type CustomExtClient struct {
|
|||
}
|
||||
|
||||
func (ext *ExtClient) ConvertToStaticNode() Node {
|
||||
|
||||
if ext.Tags == nil {
|
||||
ext.Tags = make(map[TagID]struct{})
|
||||
}
|
||||
return Node{
|
||||
CommonNode: CommonNode{
|
||||
Network: ext.Network,
|
||||
|
|
Loading…
Add table
Reference in a new issue