Skip to content

Commit edd2604

Browse files
KinyaElGrandekelanik8
authored andcommitted
Add global blocks ID
1 parent 9001b34 commit edd2604

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

server/compose/service/namespace.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,13 @@ func (svc namespace) handleUpdate(ctx context.Context, upd *types.Namespace) nam
650650
// Get max blockID for later use
651651
blockID := uint64(0)
652652
for _, b := range res.Blocks {
653+
if b.BlockID == blockID {
654+
// assign ids on new page blocks
655+
for i := range upd.Blocks {
656+
upd.Blocks[i].BlockID = uint64(i) + 1
657+
}
658+
}
659+
653660
if b.BlockID > blockID {
654661
blockID = b.BlockID
655662
}

0 commit comments

Comments
 (0)