This commit is contained in:
Daniel 2025-08-10 11:20:53 +08:00
parent aaf1d9896a
commit de8eb72393
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 35 additions and 36 deletions

View file

@ -120,15 +120,11 @@ func upgradeSpec1(av *AttributeView) {
for _, v := range kv.Values {
if 0 == v.Block.Created {
logging.LogWarnf("block [%s] created time is empty", v.BlockID)
if "" == v.Block.ID {
v.Block.ID = v.BlockID
if "" == v.Block.ID {
v.Block.ID = ast.NewNodeID()
v.BlockID = v.Block.ID
}
if "" == v.BlockID {
v.BlockID = ast.NewNodeID()
}
createdStr := v.Block.ID[:len("20060102150405")]
createdStr := v.BlockID[:len("20060102150405")]
created, parseErr := time.ParseInLocation("20060102150405", createdStr, time.Local)
if nil == parseErr {
v.Block.Created = created.UnixMilli()