diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 1f46e93d591..a787d1e52c4 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -1670,6 +1670,7 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error } } + replacedRowID := false for _, v := range attrView.Views { switch v.LayoutType { case av.LayoutTypeTable: @@ -1682,8 +1683,14 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error for i, rowID := range v.Table.RowIDs { if rowID == operation.PreviousID { v.Table.RowIDs[i] = operation.NextID + replacedRowID = true + break } } + + if !replacedRowID { + v.Table.RowIDs = append(v.Table.RowIDs, operation.NextID) + } } }