code: def save(self, *args, **kwargs):
          
          objects = self.get_filtered_manager()
          old_pos = getattr(self, '_original_sort_order', None)
          new_pos = self.sort_order
  
          if old_pos is None and self._unique_togethers_changed():
              self.sort_order = None
              new_pos = None
  
          try:
              with transaction.atomic():
                  self._save(objects, old_pos, new_pos)
          except IntegrityError:
              with transaction.atomic():
                  old_pos = objects.filter(pk=self.pk).values_list(
                      'sort_order', flat=True)[0]
                  self._save(objects, old_pos, new_pos)
  
          # Call the "real" save() method.
          super(Orderable, self).save(*args, **kwargs)
docs: Keep the unique order in sync.