🎨 Improve add database table view

This commit is contained in:
Daniel 2023-12-13 21:38:36 +08:00
parent c461bad99a
commit 43e0beaeae
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -785,6 +785,7 @@ func (tx *Transaction) doDuplicateAttrViewView(operation *Operation) (ret *TxErr
}
view.Table.PageSize = masterView.Table.PageSize
view.Table.RowIDs = masterView.Table.RowIDs
if err = av.SaveAttributeView(attrView); nil != err {
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
@ -817,6 +818,8 @@ func (tx *Transaction) doAddAttrViewView(operation *Operation) (ret *TxErr) {
view.Table.Columns = append(view.Table.Columns, &av.ViewTableColumn{ID: col.ID})
}
view.Table.RowIDs = firstView.Table.RowIDs
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}