diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-21 12:40:03 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-11-22 06:53:08 +0300 |
commit | aeaa5b5037a30b4a49b520bd92ed6a40f55e7fb7 (patch) | |
tree | 0bfacec2330a55cf88a3882b92d97948306f6011 /app | |
parent | 94b33caf8488d98f49ff3c1b468d3e0327135bc4 (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.rb | 2 |
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 |