This commit is contained in:
Daniel 2025-08-12 00:36:44 +08:00
parent 7b3ac79d78
commit 8ddac77915
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -310,10 +310,6 @@ func fillAttributeViewBaseValue(baseValue *av.BaseValue, fieldID, itemID string,
baseValue.Value = &av.Value{ID: baseValue.ID, KeyID: fieldID, BlockID: itemID, Type: av.KeyTypeCreated}
case av.KeyTypeUpdated: // 填充更新时间字段值,后面再渲染
baseValue.Value = &av.Value{ID: baseValue.ID, KeyID: fieldID, BlockID: itemID, Type: av.KeyTypeUpdated}
case av.KeyTypeRelation: // 清空关联字段值,后面再渲染 https://ld246.com/article/1703831044435
if nil != baseValue.Value && nil != baseValue.Value.Relation {
baseValue.Value.Relation.Contents = nil
}
}
if nil == baseValue.Value {
@ -408,6 +404,7 @@ func fillAttributeViewAutoGeneratedValues(attrView *av.AttributeView, collection
keyValues = append(keyValues, &av.KeyValues{Key: rollupKey, Values: []*av.Value{{ID: value.ID, KeyID: rollupKey.ID, BlockID: itemID, Type: av.KeyTypeRollup, Rollup: value.Rollup}}})
items[itemID] = keyValues
case av.KeyTypeRelation: // 渲染关联字段
value.Relation.Contents = nil
relKey, _ := attrView.GetKey(value.KeyID)
if nil != relKey && nil != relKey.Relation {
destAv := avCache[relKey.Relation.AvID]