🎨 Add Relation column to database table view https://github.com/siyuan-note/siyuan/issues/9888

This commit is contained in:
Daniel
2023-12-25 00:33:40 +08:00
parent 078c3700b3
commit eca04497d7

View File

@@ -2173,8 +2173,10 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
oldBoundBlockID := val.BlockID
var oldRelationBlockIDs []string
if av.KeyTypeRelation == val.Type {
for _, bID := range val.Relation.BlockIDs {
oldRelationBlockIDs = append(oldRelationBlockIDs, bID)
if nil != val.Relation {
for _, bID := range val.Relation.BlockIDs {
oldRelationBlockIDs = append(oldRelationBlockIDs, bID)
}
}
}
data, err := gulu.JSON.MarshalJSON(valueData)