mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
5faa2e4175
commit
421323164e
2 changed files with 5 additions and 2 deletions
|
|
@ -881,6 +881,9 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
|
|||
}
|
||||
|
||||
if 0 < len(kValues.Values) {
|
||||
for _, v := range kValues.Values {
|
||||
sql.FillAttributeViewNilValue(v, v.Type)
|
||||
}
|
||||
keyValues = append(keyValues, kValues)
|
||||
} else {
|
||||
// 如果没有值,那么就补一个默认值
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ func fillAttributeViewBaseValue(baseValue *av.BaseValue, fieldID, itemID string,
|
|||
if nil == baseValue.Value {
|
||||
baseValue.Value = av.GetAttributeViewDefaultValue(baseValue.ID, fieldID, itemID, baseValue.ValueType)
|
||||
} else {
|
||||
fillAttributeViewNilValue(baseValue.Value, baseValue.ValueType)
|
||||
FillAttributeViewNilValue(baseValue.Value, baseValue.ValueType)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -425,7 +425,7 @@ func fillAttributeViewTemplateValue(value *av.Value, item av.Item, attrView *av.
|
|||
return
|
||||
}
|
||||
|
||||
func fillAttributeViewNilValue(value *av.Value, typ av.KeyType) {
|
||||
func FillAttributeViewNilValue(value *av.Value, typ av.KeyType) {
|
||||
value.Type = typ
|
||||
switch typ {
|
||||
case av.KeyTypeText:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue