private function getWeight() {
    if (!is_null($this->options->weight)) {
      return $this->options->weight;
    }

    if (!is_null($this->media)) {
      return $this->media->weight;
    }

    return $this->media()->where('group', $this->group)->count();
  }