🎨 Support modifying the primary key value of the binding block https://github.com/siyuan-note/siyuan/issues/9892

This commit is contained in:
Daniel 2023-12-18 19:47:59 +08:00
parent 1f31a33977
commit ea705bfbd5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -1880,10 +1880,6 @@ func bindBlockAv(tx *Transaction, avID, blockID string) {
attrs[av.NodeAttrNameAvs] = avID
} else {
avIDs := strings.Split(attrs[av.NodeAttrNameAvs], ",")
if gulu.Str.Contains(avID, avIDs) {
return
}
avIDs = append(avIDs, avID)
avIDs = gulu.Str.RemoveDuplicatedElem(avIDs)
attrs[av.NodeAttrNameAvs] = strings.Join(avIDs, ",")