🎨 Fix database table view loading https://ld246.com/article/1697168944677

This commit is contained in:
Daniel committed 2023-10-13 13:22:26 +08:00
1 parent 48e871c75e
commit 00ed190ad7
2 files changed
+8

No files matched your search

+4
View File
@@ -520,6 +520,10 @@ func SaveAttributeView(av *AttributeView) (err error) {
// 补全 block 的创建时间和更新时间
for _, v := range kv.Values {
if 0 == v.Block.Created {
if "" == v.Block.ID {
v.Block.ID = ast.NewNodeID()
}
createdStr := v.Block.ID[:len("20060102150405")]
created, parseErr := time.ParseInLocation("20060102150405", createdStr, time.Local)
if nil == parseErr {
+4
View File
@@ -190,6 +190,10 @@ func RenderAttributeView(avID string) (viewable av.Viewable, attrView *av.Attrib
case av.KeyTypeBlock: // 补全 block 的创建时间和更新时间
for _, v := range kv.Values {
if 0 == v.Block.Created {
if "" == v.Block.ID {
v.Block.ID = ast.NewNodeID()
}
createdStr := v.Block.ID[:len("20060102150405")]
created, parseErr := time.ParseInLocation("20060102150405", createdStr, time.Local)
if nil == parseErr {