🎨 Supports multiple views for the database https://github.com/siyuan-note/siyuan/issues/9751
This commit is contained in:
parent
e6a84f9e14
commit
134d893167
1 changed files with 2 additions and 9 deletions
|
@ -770,7 +770,7 @@ func (tx *Transaction) doSetAttrViewViewName(operation *Operation) (ret *TxErr)
|
|||
return &TxErr{code: TxErrWriteAttributeView, id: viewID}
|
||||
}
|
||||
|
||||
view.Name = operation.Data.(string)
|
||||
view.Name = strings.TrimSpace(operation.Data.(string))
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
|
||||
return &TxErr{code: TxErrWriteAttributeView, msg: err.Error(), id: avID}
|
||||
|
@ -816,14 +816,7 @@ func setAttributeViewName(operation *Operation) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
view, err := attrView.GetCurrentView()
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
attrView.Name = operation.Data.(string)
|
||||
view.Name = operation.Data.(string)
|
||||
|
||||
attrView.Name = strings.TrimSpace(operation.Data.(string))
|
||||
err = av.SaveAttributeView(attrView)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue