mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-31 22:08:48 +01:00
🐛 Fix database table view number delete https://ld246.com/article/1706162341369
This commit is contained in:
parent
eb9de3cbb9
commit
06e2ce29c5
1 changed files with 8 additions and 0 deletions
|
|
@ -2432,6 +2432,14 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
|
|||
if err = gulu.JSON.UnmarshalJSON(data, &val); nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
if av.KeyTypeNumber == val.Type {
|
||||
if nil != val.Number && !val.Number.IsNotEmpty {
|
||||
// 删除内容为空值
|
||||
val.Number.Content = 0
|
||||
}
|
||||
}
|
||||
|
||||
relationChangeMode := 0 // 0:不变(仅排序),1:增加,2:减少
|
||||
if av.KeyTypeRelation == val.Type {
|
||||
// 关联列得 content 是自动渲染的,所以不需要保存
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue