mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-10 10:00:46 +09:00
builtinobjects import: preserve subobject ids
This commit is contained in:
parent
f4548c12f5
commit
8cf8d3c3b8
1 changed files with 2 additions and 3 deletions
|
@ -11,7 +11,6 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"github.com/gogo/protobuf/types"
|
||||
"github.com/textileio/go-threads/core/thread"
|
||||
|
||||
|
@ -118,8 +117,8 @@ func (b *builtinObjects) inject(ctx context.Context) (err error) {
|
|||
return err
|
||||
}
|
||||
if sbt == smartblock.SmartBlockTypeSubObject {
|
||||
newId := bson.NewObjectId().Hex()
|
||||
b.idsMap[id] = newId
|
||||
// preserve original id for subobjects, it makes no sense to replace them and also it breaks the grouping
|
||||
b.idsMap[id] = id
|
||||
continue
|
||||
}
|
||||
tid, err := threads.ThreadCreateID(thread.AccessControlled, sbt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue