🐛 Database table view sorts abnormally after deleting numeric values Fix https://github.com/siyuan-note/siyuan/issues/10476

This commit is contained in:
Daniel 2024-03-01 10:33:25 +08:00
parent 1635b4b8c2
commit a650764c12
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 29 additions and 1 deletions

View file

@ -2534,10 +2534,14 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
if av.KeyTypeNumber == val.Type {
if nil != val.Number && !val.Number.IsNotEmpty {
// 删除内容为空值
val.Number.Content = 0
val.Number.FormattedContent = ""
}
} else if av.KeyTypeDate == val.Type {
if nil != val.Date && !val.Date.IsNotEmpty {
val.Date.Content = 0
val.Date.FormattedContent = ""
}
}
relationChangeMode := 0 // 0不变仅排序1增加2减少