🎨 Database table view cell value adds createdAt and updatedAt fields https://github.com/siyuan-note/siyuan/issues/10492

Adding rows after setting the sort field in the database table view no longer fills in the default value https://github.com/siyuan-note/siyuan/issues/10486
This commit is contained in:
Daniel 2024-03-03 16:21:31 +08:00
parent 01744ae69e
commit 13c0bccecd
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 7 additions and 0 deletions

View file

@ -612,6 +612,10 @@ func renderAttributeView(attrView *av.AttributeView, viewID string, page, pageSi
// 补全值的创建时间和更新时间
for _, v := range kv.Values {
if "" == v.ID {
v.ID = ast.NewNodeID()
}
createdStr := v.ID[:len("20060102150405")]
created, parseErr := time.ParseInLocation("20060102150405", createdStr, time.Local)
if nil == parseErr {