mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b77d27b91a
2 changed files with 10 additions and 4 deletions
|
|
@ -233,8 +233,8 @@ func (value *Value) Compare(other *Value, attrView *AttributeView) int {
|
|||
}
|
||||
oContent := strings.TrimSpace(oContentBuf.String())
|
||||
|
||||
v1, ok1 := util.Convert2Float(value.Template.Content)
|
||||
v2, ok2 := util.Convert2Float(other.Template.Content)
|
||||
v1, ok1 := util.Convert2Float(vContent)
|
||||
v2, ok2 := util.Convert2Float(oContent)
|
||||
if ok1 && ok2 {
|
||||
if v1 > v2 {
|
||||
return 1
|
||||
|
|
@ -262,8 +262,8 @@ func (value *Value) Compare(other *Value, attrView *AttributeView) int {
|
|||
}
|
||||
oContent := strings.TrimSpace(oContentBuf.String())
|
||||
|
||||
v1, ok1 := util.Convert2Float(value.Template.Content)
|
||||
v2, ok2 := util.Convert2Float(other.Template.Content)
|
||||
v1, ok1 := util.Convert2Float(vContent)
|
||||
v2, ok2 := util.Convert2Float(oContent)
|
||||
if ok1 && ok2 {
|
||||
if v1 > v2 {
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -3003,6 +3003,12 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
|
|||
return
|
||||
}
|
||||
|
||||
if "" == val.ID {
|
||||
// 有时前端会误调用该接口(比如创建完快速切换),这里判断一下,避免误更新刚刚创建的值
|
||||
// Primary key value unexpectedly updated when database adds row https://github.com/siyuan-note/siyuan/issues/11018
|
||||
return
|
||||
}
|
||||
|
||||
if av.KeyTypeNumber == val.Type {
|
||||
if nil != val.Number && !val.Number.IsNotEmpty {
|
||||
val.Number.Content = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue