protected function updateListifyPositions()
    {
        $newPosition = $this->getListifyPosition();

        // check for duplicate positions and resolve them if required
        if (null === $newPosition) return;

        $count = $this->listifyScopedQuery()
            ->where($this->positionColumn(), $newPosition)
            ->count();

        if ($count < 2) return;

        $oldPosition = Arr::get($this->getOriginal(), $this->positionColumn(), false);

        if (false === $oldPosition) return;

        // reorder positions while excluding the current model
        $this->reorderPositionsOnItemsBetween($oldPosition, $newPosition, $this->id);
    }