Snippet repo: Remove safe navigators and return early
The following discussion from !205897 should be addressed: - [ ] @jwoodwardgl started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/205897#note_2781134159): (+1 comment) > **nitpick(non-blocking)** you've already verified that snippet exists so the extra safe navigator is unnecessary > > ```suggestion:-1+0 > self.organization = snippet.organization if snippet&.organization_id.present? > self.project = snippet.project if snippet&.project_id.present? > ``` > > In fact, we can actually just return early if there's no snippet and remove all safe navigators > > ```suggestion:-3+0 > return if compact_sharding_keys.size == 1 || snippet.nil? > > self.organization = snippet.organization if snippet.organization_id.present? > self.project = snippet.project if snippet.project_id.present? > ```
issue