1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 09:35:00 +09:00

Merge pull request #1721 from anytypeio/fix-objectcreate-relation-go-735

Fix object creator relations
This commit is contained in:
Roman Khafizianov 2023-01-17 15:35:28 +01:00 committed by GitHub
commit b7b194dbef
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 57 additions and 33 deletions

View file

@ -58,7 +58,7 @@ type BuiltinObjects interface {
}
type objectCreator interface {
CreateSmartBlockFromState(ctx context.Context, sbType coresb.SmartBlockType, details *types.Struct, relationIds []string, createState *state.State) (id string, newDetails *types.Struct, err error)
CreateSmartBlockFromState(ctx context.Context, sbType coresb.SmartBlockType, details *types.Struct, createState *state.State) (id string, newDetails *types.Struct, err error)
}
type builtinObjects struct {
@ -257,7 +257,7 @@ func (b *builtinObjects) createObject(ctx context.Context, rd io.ReadCloser) (er
return err
}
_, _, err = b.objectCreator.CreateSmartBlockFromState(ctx, sbt, nil, nil, st)
_, _, err = b.objectCreator.CreateSmartBlockFromState(ctx, sbt, nil, st)
if isFavorite {
err = b.service.SetPageIsFavorite(pb.RpcObjectSetIsFavoriteRequest{ContextId: newId, IsFavorite: true})
if err != nil {