Daniel 2024-03-10 22:57:21 +08:00
parent d59d4afa51
commit f3fff63b7d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 3 additions and 8 deletions

View file

@ -2202,11 +2202,12 @@ func removeNodeAvID(node *ast.Node, avID string, tx *Transaction, tree *parse.Tr
avIDs = existAvIDs
if 0 == len(avIDs) {
delete(attrs, av.NodeAttrNameAvs)
node.RemoveIALAttr(av.NodeAttrNameAvs)
attrs[av.NodeAttrNameAvs] = ""
} else {
attrs[av.NodeAttrNameAvs] = strings.Join(avIDs, ",")
node.SetIALAttr(av.NodeAttrNameAvs, strings.Join(avIDs, ","))
avNames := getAvNames(node.IALAttr(av.NodeAttrNameAvs))
attrs["av-names"] = avNames
}
}