add migration for extclient tags

This commit is contained in:
abhishek9686 2025-03-25 17:01:03 +04:00
parent 4c14cfd099
commit 75307cb726
2 changed files with 10 additions and 1 deletions

View file

@ -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) {

View file

@ -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,