mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-01 21:21:47 +01:00
🐛 Database rollup calculation misses null values https://github.com/siyuan-note/siyuan/issues/10843
This commit is contained in:
parent
e7204ac10f
commit
2a3d236d8e
3 changed files with 34 additions and 4 deletions
|
|
@ -523,6 +523,22 @@ func (av *AttributeView) GetCurrentView(viewID string) (ret *View, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (av *AttributeView) ExistBlock(blockID string) bool {
|
||||
for _, kv := range av.KeyValues {
|
||||
if KeyTypeBlock != kv.Key.Type {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, v := range kv.Values {
|
||||
if v.BlockID == blockID {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (av *AttributeView) GetValue(keyID, blockID string) (ret *Value) {
|
||||
for _, kv := range av.KeyValues {
|
||||
if kv.Key.ID == keyID {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue