Merge branch 'ref-ex-no-proj' into 'master'

Fix reference extractor when there is no project.

This usually doesn't happen, but it can when the source project of an MR is deleted.

This is the cause of the 500 error on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/488.

cc @jacobvosmaer Does this sound like something that can go in the next patch release? I don't know if it's a regression per se, but it's a bug and a tiny fix.

See merge request !435
This commit is contained in:
Dmitriy Zaporozhets
2015-07-02 15:50:25 +00:00
+1 -1
View File
@@ -20,7 +20,7 @@ module Gitlab
end
def issues
if project.jira_tracker?
if project && project.jira_tracker?
references[:external_issue]
else
references[:issue]