Skip to content

Commit

Permalink
🎨 Improve database created and updated column values #9391
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 10, 2023
1 parent f404d7f commit 964c822
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -1296,8 +1296,16 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
bindBlockAv(tx, avID, rowID)
}

if nil != val.Block {
val.Block.Updated = time.Now().UnixMilli()
for _, kv := range attrView.KeyValues {
if av.KeyTypeBlock == kv.Key.Type {
for _, v := range kv.Values {
if rowID == v.Block.ID {
v.Block.Updated = time.Now().UnixMilli()
break
}
}
break
}
}

if err = av.SaveAttributeView(attrView); nil != err {
Expand Down

0 comments on commit 964c822

Please sign in to comment.