Commit 1081dfc5 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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
parents 82693c40 246fe927
......@@ -20,7 +20,7 @@ module Gitlab
end
def issues
if project.jira_tracker?
if project && project.jira_tracker?
references[:external_issue]
else
references[:issue]
......
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