mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 00:20:11 +08:00
🎨 Supports multiple views for the database https://github.com/siyuan-note/siyuan/issues/9751
This commit is contained in:
parent
e6a84f9e14
commit
134d893167
@ -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…
Reference in New Issue
Block a user