mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-25 11:00:13 +01:00
🎨 Database template column supports created and updated built-in variables https://github.com/siyuan-note/siyuan/issues/9364
This commit is contained in:
parent
549a8eeea4
commit
5c8fb01dc2
1 changed files with 2 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ func renderTemplateCol(blockID, tplContent string, rowValues []*av.KeyValues) st
|
|||
createdStr = createdStr[:len("20060102150405")]
|
||||
}
|
||||
created, parseErr := time.Parse("20060102150405", createdStr)
|
||||
if nil != parseErr {
|
||||
if nil == parseErr {
|
||||
dataModel["created"] = created
|
||||
} else {
|
||||
logging.LogWarnf("parse created [%s] failed: %s", createdStr, parseErr)
|
||||
|
|
@ -69,7 +69,7 @@ func renderTemplateCol(blockID, tplContent string, rowValues []*av.KeyValues) st
|
|||
}
|
||||
updatedStr := ial["updated"]
|
||||
updated, parseErr := time.Parse("20060102150405", updatedStr)
|
||||
if nil != parseErr {
|
||||
if nil == parseErr {
|
||||
dataModel["updated"] = updated
|
||||
} else {
|
||||
logging.LogWarnf("parse updated [%s] failed: %s", updatedStr, parseErr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue