Commit 63493944 authored by Katarzyna Kobierska's avatar Katarzyna Kobierska

Render invalid template for merge requests without source project and open

parent 9498c4d5
...@@ -428,6 +428,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -428,6 +428,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end end
def validates_merge_request 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 # Show git not found page
# if there is no saved commits between source & target branch # if there is no saved commits between source & target branch
if @merge_request.commits.blank? if @merge_request.commits.blank?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment