diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-02 14:36:25 +0300 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-09-13 15:40:05 +0300 |
commit | 09cded29d8b86cafbcfaed57b1d915588195f69f (patch) | |
tree | 0923e9bbe2b5de2a45fc95319db6a326cd0f5425 /app | |
parent | 8c77a1fb250cf6d6ca06bedc3b52fc62f1cc4819 (diff) |
Checks if deleting forked project closed all open merge requests
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 4 | ||||
-rw-r--r-- | app/models/merge_request.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 8895cb955bd..479b2d1d900 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -429,7 +429,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController def validates_merge_request # If source project was removed (Ex. mr from fork to origin) - return invalid_mr unless @merge_request.source_project + # return invalid_mr unless @merge_request.source_project # Show git not found page # if there is no saved commits between source & target branch @@ -438,7 +438,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController return invalid_mr unless @merge_request.target_branch_exists? # or if source branch doesn't exist - return invalid_mr unless @merge_request.source_branch_exists? + # return invalid_mr unless @merge_request.source_branch_exists? end end diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index b0b1313f94a..7d3c8c5078a 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -313,7 +313,7 @@ class MergeRequest < ActiveRecord::Base end def closed_without_fork? - closed? && forked_source_project_missing? + closed? && (forked_source_project_missing? || !source_project) end def forked_source_project_missing? |