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

Add builtinobjects

This commit is contained in:
mcrakhman 2023-04-25 18:17:59 +02:00 committed by Mikhail Iudin
parent 20898cae9d
commit c7275385aa
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0

View file

@ -256,11 +256,15 @@ func (b *builtinObjects) createObject(ctx context.Context, rd io.ReadCloser) (er
}
start := time.Now()
err = b.service.Do(newId, func(b sb.SmartBlock) error {
return b.Apply(st)
return b.ResetToVersion(st)
})
if err != nil {
return err
}
err = b.service.Do(newId, func(b sb.SmartBlock) error {
return nil
})
log.With("timeMs", time.Now().Sub(start).Milliseconds()).Info("creating debug obj")
if isFavorite {