3
0

Fix improper page blockID assignment on create

This commit is contained in:
Tomaž Jerman
2022-02-16 13:38:25 +01:00
parent 78cb155be3
commit 6ee6607c64

View File

@@ -290,8 +290,8 @@ func (svc page) Create(ctx context.Context, new *types.Page) (*types.Page, error
new.DeletedAt = nil
// Ensure page-block IDs
for i, b := range new.Blocks {
b.BlockID = uint64(i) + 1
for i := range new.Blocks {
new.Blocks[i].BlockID = uint64(i) + 1
}
if err = store.CreateComposePage(ctx, s, new); err != nil {