diff --git a/polynum/base/management/commands/loadentities.py b/polynum/base/management/commands/loadentities.py index 37947de..6bba5a5 100644 --- a/polynum/base/management/commands/loadentities.py +++ b/polynum/base/management/commands/loadentities.py @@ -204,7 +204,7 @@ class Command(BaseCommand): if self.old_left_bound > 2*(len(parser.entities)+Entity.objects.all().count())-1: start_bound = 0 else: - start_bound = self.old_right_bound + start_bound = self.old_right_bound+1 end_bound = self.allocate_instances(root, start_bound, instances, (root.code,)) print left_bounds = [i.left_bound for i in instances if not i.id or i.reused] @@ -227,8 +227,8 @@ class Command(BaseCommand): print i = 0 for entity in filter(lambda x: bool(x.id) and not x.reused, self.old_instances.values()): - entity.left_bound = end_bound+i*2 - entity.right_bound = end_bound+i*2+1 + entity.left_bound = end_bound+i*2+1 + entity.right_bound = end_bound+i*2+2 entity.is_active = False entity.save() i += 1