public function beforeSave($insert)
    {
        if (!$this->sort_order) {
            $property = Property::findById($this->property_id);
            $this->sort_order = count(static::valuesForProperty($property));
        }
        return parent::beforeSave($insert);
    }