Skip to content
Snippets Groups Projects
Commit 63493944 authored by Katarzyna Kobierska's avatar Katarzyna Kobierska
Browse files

Render invalid template for merge requests without source project and open

parent 9498c4d5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -428,6 +428,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end
 
def validates_merge_request
# If source project was removed and merge request for some reason
# wasn't close (Ex. mr from fork to origin)
return invalid_mr if !@merge_request.source_project && @merge_request.open?
# Show git not found page
# if there is no saved commits between source & target branch
if @merge_request.commits.blank?
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment