mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Update database https://github.com/siyuan-note/siyuan/issues/10038
This commit is contained in:
parent
da2475deab
commit
6462107872
1 changed files with 4 additions and 2 deletions
|
|
@ -312,7 +312,7 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
|
||||||
if 0 < len(kv.Values) {
|
if 0 < len(kv.Values) {
|
||||||
ial := map[string]string{}
|
ial := map[string]string{}
|
||||||
block := getRowBlockValue(keyValues)
|
block := getRowBlockValue(keyValues)
|
||||||
if !block.IsDetached {
|
if nil != block && !block.IsDetached {
|
||||||
ial = GetBlockAttrsWithoutWaitWriting(blockID)
|
ial = GetBlockAttrsWithoutWaitWriting(blockID)
|
||||||
}
|
}
|
||||||
kv.Values[0].Template.Content = renderTemplateCol(ial, kv.Key.Template, keyValues)
|
kv.Values[0].Template.Content = renderTemplateCol(ial, kv.Key.Template, keyValues)
|
||||||
|
|
@ -592,8 +592,10 @@ func renderAttributeView(attrView *av.AttributeView, viewID string, page, pageSi
|
||||||
func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*av.KeyValues) string {
|
func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*av.KeyValues) string {
|
||||||
if "" == ial["id"] {
|
if "" == ial["id"] {
|
||||||
block := getRowBlockValue(rowValues)
|
block := getRowBlockValue(rowValues)
|
||||||
|
if nil != block && nil != block.Block {
|
||||||
ial["id"] = block.Block.ID
|
ial["id"] = block.Block.ID
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if "" == ial["updated"] {
|
if "" == ial["updated"] {
|
||||||
block := getRowBlockValue(rowValues)
|
block := getRowBlockValue(rowValues)
|
||||||
ial["updated"] = time.UnixMilli(block.Block.Updated).Format("20060102150405")
|
ial["updated"] = time.UnixMilli(block.Block.Updated).Format("20060102150405")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue