Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-21 12:40:03 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-11-22 06:53:08 +0300
commitaeaa5b5037a30b4a49b520bd92ed6a40f55e7fb7 (patch)
tree0bfacec2330a55cf88a3882b92d97948306f6011 /app
parent94b33caf8488d98f49ff3c1b468d3e0327135bc4 (diff)
Merge branch 'fix-merge-requests-without-source-projects' into 'master'
Handle removed source projects in MR CI commits Fixes #3599 @dzaporozhets assigning this to you since you wrote the original code. Perhaps checking for the source project isn't the right way, but I'm not sure if there's a better way (e.g. somewhere earlier in the process) that we can detect this. See merge request !1859
Diffstat (limited to 'app')
-rw-r--r--app/models/merge_request.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 2eb03b8ba5b..942a052876e 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -473,7 +473,7 @@ class MergeRequest < ActiveRecord::Base
end
def ci_commit
- if last_commit
+ if last_commit and source_project
source_project.ci_commit(last_commit.id)
end
end