Skip to content

Commit

Permalink
GO-3849 Do not GC set if source is set
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillSto committed Aug 29, 2024
1 parent a7e36f5 commit 2a33dc6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/block/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,13 @@ func (s *Service) SetSource(ctx session.Context, req pb.RpcObjectSetSourceReques
return true
})
st.SetDetailAndBundledRelation(bundle.RelationKeySetOf, pbtypes.StringList(req.Source))
return sb.Apply(st, smartblock.NoRestrictions)

flags := internalflag.NewFromState(st)
// set with source is no longer empty
flags.Remove(model.InternalFlag_editorDeleteEmpty)
flags.AddToState(st)

return sb.Apply(st, smartblock.NoRestrictions, smartblock.KeepInternalFlags)
})
}

Expand Down

0 comments on commit 2a33dc6

Please sign in to comment.