mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443
This commit is contained in:
parent
ebabd66ebc
commit
9315ac1cf8
1 changed files with 5 additions and 5 deletions
|
|
@ -1345,7 +1345,12 @@ func (tx *Transaction) doRemoveAttrViewView(operation *Operation) (ret *TxErr) {
|
|||
if 0 > index {
|
||||
index = 0
|
||||
}
|
||||
|
||||
attrView.ViewID = attrView.Views[index].ID
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
|
||||
return &TxErr{code: TxErrCodeWriteTree, msg: err.Error(), id: avID}
|
||||
}
|
||||
|
||||
mirrorBlocks := av.GetMirrorBlockIDs(avID)
|
||||
mirrorBlockTree := map[string]*parse.Tree{}
|
||||
|
|
@ -1399,11 +1404,6 @@ func (tx *Transaction) doRemoveAttrViewView(operation *Operation) (ret *TxErr) {
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
|
||||
return &TxErr{code: TxErrCodeWriteTree, msg: err.Error(), id: avID}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue