mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
8429a1df0b
commit
712092d49e
1 changed files with 1 additions and 5 deletions
|
|
@ -4848,14 +4848,10 @@ func updateAttributeViewValue(tx *Transaction, attrView *av.AttributeView, keyID
|
||||||
if av.KeyTypeRelation == val.Type {
|
if av.KeyTypeRelation == val.Type {
|
||||||
// 关联字段得 content 是自动渲染的,所以不需要保存
|
// 关联字段得 content 是自动渲染的,所以不需要保存
|
||||||
val.Relation.Contents = nil
|
val.Relation.Contents = nil
|
||||||
|
|
||||||
// 去重
|
|
||||||
val.Relation.BlockIDs = gulu.Str.RemoveDuplicatedElem(val.Relation.BlockIDs)
|
val.Relation.BlockIDs = gulu.Str.RemoveDuplicatedElem(val.Relation.BlockIDs)
|
||||||
|
|
||||||
// 计算关联变更模式
|
// 计算关联变更模式
|
||||||
if len(oldRelationBlockIDs) == len(val.Relation.BlockIDs) {
|
if !slices.Equal(oldRelationBlockIDs, val.Relation.BlockIDs) {
|
||||||
relationChangeMode = 0
|
|
||||||
} else {
|
|
||||||
if len(oldRelationBlockIDs) > len(val.Relation.BlockIDs) {
|
if len(oldRelationBlockIDs) > len(val.Relation.BlockIDs) {
|
||||||
relationChangeMode = 2
|
relationChangeMode = 2
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue