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:
parent
a150c7f7fc
commit
cf4de4b115
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue