🎨 Supports multiple views for the database https://github.com/siyuan-note/siyuan/issues/9751

This commit is contained in:
Daniel 2023-11-30 23:19:43 +08:00
parent eb6af31572
commit 19475004b4
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 10 additions and 9 deletions

View file

@ -294,7 +294,7 @@ func RenderAttributeView(avID, viewID string) (viewable av.Viewable, attrView *a
func renderAttributeView(attrView *av.AttributeView, viewID string) (viewable av.Viewable, err error) {
if 1 > len(attrView.Views) {
view := av.NewView()
view, _ := av.NewView()
attrView.Views = append(attrView.Views, view)
attrView.ViewID = view.ID
if err = av.SaveAttributeView(attrView); nil != err {

View file

@ -294,7 +294,7 @@ func (tx *Transaction) doAddAttrViewView(operation *Operation) (ret *TxErr) {
return &TxErr{code: TxErrCodeBlockNotFound, id: avID}
}
view := av.NewView()
view, _ := av.NewView()
view.ID = operation.ID
attrView.Views = append(attrView.Views, view)
attrView.ViewID = view.ID