mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🐛 Database filtering does not work after change the field type https://github.com/siyuan-note/siyuan/issues/10519
This commit is contained in:
parent
ae783adb4c
commit
1f22227758
1 changed files with 7 additions and 1 deletions
|
|
@ -257,7 +257,8 @@ func (value *Value) Compare(other *Value) int {
|
|||
}
|
||||
|
||||
func (value *Value) CompareOperator(filter *ViewFilter, attrView *AttributeView, rowID string) bool {
|
||||
if nil != value.Rollup && KeyTypeRollup == value.Type && nil != filter.Value && KeyTypeRollup == filter.Value.Type {
|
||||
if nil != value.Rollup && KeyTypeRollup == value.Type && nil != filter && nil != filter.Value && KeyTypeRollup == filter.Value.Type {
|
||||
// 单独处理汇总类型的比较
|
||||
key, _ := attrView.GetKey(value.KeyID)
|
||||
if nil == key {
|
||||
return false
|
||||
|
|
@ -298,6 +299,11 @@ func (value *Value) compareOperator(filter *ViewFilter) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
if nil != filter.Value && value.Type != filter.Value.Type {
|
||||
// 由于字段类型被用户编辑过导致和过滤器值类型不匹配,该情况下不过滤
|
||||
return true
|
||||
}
|
||||
|
||||
operator := filter.Operator
|
||||
switch value.Type {
|
||||
case KeyTypeBlock:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue