mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
This commit is contained in:
parent
d0f350d215
commit
8895613f8b
4 changed files with 8 additions and 8 deletions
|
@ -351,7 +351,7 @@ func addAttributeViewBlocks(c *gin.Context) {
|
|||
ignoreDefaultFill = arg["ignoreDefaultFill"].(bool)
|
||||
}
|
||||
|
||||
err := model.AddAttributeViewBlock(nil, srcs, avID, blockID, groupID, previousID, ignoreDefaultFill, nil)
|
||||
err := model.AddAttributeViewBlock(nil, srcs, avID, blockID, groupID, previousID, ignoreDefaultFill, map[string]interface{}{})
|
||||
if err != nil {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
|
|
|
@ -2958,6 +2958,10 @@ func setAttributeViewColumnCalc(operation *Operation) (err error) {
|
|||
}
|
||||
|
||||
func (tx *Transaction) doInsertAttrViewBlock(operation *Operation) (ret *TxErr) {
|
||||
if nil == operation.Context {
|
||||
operation.Context = map[string]interface{}{}
|
||||
}
|
||||
|
||||
err := AddAttributeViewBlock(tx, operation.Srcs, operation.AvID, operation.BlockID, operation.GroupID, operation.PreviousID, operation.IgnoreDefaultFill, operation.Context)
|
||||
if err != nil {
|
||||
return &TxErr{code: TxErrHandleAttributeView, id: operation.AvID, msg: err.Error()}
|
||||
|
@ -3008,10 +3012,6 @@ func AddAttributeViewBlock(tx *Transaction, srcs []map[string]interface{}, avID,
|
|||
}
|
||||
|
||||
func addAttributeViewBlock(now int64, avID, dbBlockID, groupID, previousItemID, addingItemID, addingBoundBlockID, addingBlockContent string, isDetached, ignoreDefaultFill bool, tree *parse.Tree, tx *Transaction, context map[string]interface{}) (err error) {
|
||||
if nil == context {
|
||||
context = map[string]any{}
|
||||
}
|
||||
|
||||
var node *ast.Node
|
||||
if !isDetached {
|
||||
node = treenode.GetNodeInTree(tree, addingBoundBlockID)
|
||||
|
|
|
@ -991,7 +991,7 @@ func DuplicateDoc(tree *parse.Tree) {
|
|||
AddAttributeViewBlock(nil, []map[string]interface{}{{
|
||||
"id": n.ID,
|
||||
"isDetached": false,
|
||||
}}, avID, "", "", "", false, nil)
|
||||
}}, avID, "", "", "", false, map[string]interface{}{})
|
||||
ReloadAttrView(avID)
|
||||
}
|
||||
return ast.WalkContinue
|
||||
|
|
|
@ -1099,7 +1099,7 @@ func (tx *Transaction) doLargeInsert(previousID string) (ret *TxErr) {
|
|||
AddAttributeViewBlock(tx, []map[string]interface{}{{
|
||||
"id": insertedNode.ID,
|
||||
"isDetached": false,
|
||||
}}, avID, "", "", previousID, false, nil)
|
||||
}}, avID, "", "", previousID, false, map[string]interface{}{})
|
||||
ReloadAttrView(avID)
|
||||
}
|
||||
|
||||
|
@ -1284,7 +1284,7 @@ func (tx *Transaction) doInsert(operation *Operation) (ret *TxErr) {
|
|||
AddAttributeViewBlock(tx, []map[string]interface{}{{
|
||||
"id": insertedNode.ID,
|
||||
"isDetached": false,
|
||||
}}, avID, "", "", previousID, false, nil)
|
||||
}}, avID, "", "", previousID, false, map[string]interface{}{})
|
||||
ReloadAttrView(avID)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue