

def reposition(self, save=True):
    position_field = self.model._meta.get_field_by_name(self.position_field_name)[0]
    post_save.disconnect(position_field.update_on_save, sender=self.model)
    position = 0
    for obj in self.iterator():
        setattr(save, self.position_field_name, position)
        if save:
            obj.save()
        position += 1
    post_save.connect(position_field.update_on_save, sender=self.model)
    return self

dataset/ETHPy150Open jpwatts/django-positions/positions/managers.py PositionQuerySet.reposition/VarMisuse@64/81 `obj`->`save`