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

GO-3041 fixes

This commit is contained in:
Roman Khafizianov 2024-03-20 17:28:38 +01:00
parent a150c7f7fc
commit cf4de4b115
No known key found for this signature in database
GPG key ID: F07A7D55A2684852
4 changed files with 4 additions and 4 deletions

View file

@ -50,7 +50,7 @@ func (h *history) Undo(ctx session.Context) (info HistoryInfo, err error) {
}
if action.Details != nil {
s.SetDetails(pbtypes.CopyStruct(action.Details.Before, true))
s.SetDetails(pbtypes.CopyStruct(action.Details.Before, false))
}
if err = h.Apply(s, smartblock.NoHistory, smartblock.NoRestrictions); err != nil {
return

View file

@ -216,7 +216,7 @@ func (ind *indexer) injectMetadataToState(ctx context.Context, st *state.State,
}
st.AddBundledRelations(keys...)
details = pbtypes.StructMerge(prevDetails, details, true)
details = pbtypes.StructMerge(prevDetails, details, false)
st.SetDetails(details)
err = ind.addBlocks(st, details, id.ObjectID)

View file

@ -774,7 +774,7 @@ func (mw *Middleware) ObjectSetInternalFlags(cctx context.Context, req *pb.RpcOb
}
err := mw.doBlockService(func(bs *block.Service) (err error) {
return bs.ModifyDetails(req.ContextId, func(current *types.Struct) (*types.Struct, error) {
d := pbtypes.CopyStruct(current, true)
d := pbtypes.CopyStruct(current, false)
return internalflag.PutToDetails(d, req.InternalFlags), nil
})
})

View file

@ -150,7 +150,7 @@ func Block(b *model.Block) (res *model.Block) {
}
func Struct(in *types.Struct) (res *types.Struct) {
res = pbtypes.CopyStruct(in, true)
res = pbtypes.CopyStruct(in, false)
if res != nil && res.Fields != nil {
for k, v := range res.Fields {
if k != "featuredRelations" {