-
Sean McGivern authored
The `selected_target_project` helper method is used for actions where `target_project_id` is a top-level parameter, not nested under the `merge_request` hash. Even though that logic was wrong, if the target project wasn't a fork, or was a fork of an active project, this would work through coincidence (although it might check the wrong value for `approvals_before_merge`). If a project was a fork of a deleted project, however, then `selected_target_project` would be `nil`, causing a 500 error. Ensure that there is always a target project to compare to.
2396e4cc