summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/changeset.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index 13213f3ab..ae42d414e 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -200,7 +200,7 @@ class Changeset < ActiveRecord::Base
# Finds an issue that can be referenced by the commit message
def find_referenced_issue_by_id(id)
return nil if id.blank?
- issue = Issue.includes(:project).where(:id => id.to_i).first
+ issue = Issue.find_by_id(id.to_i)
if Setting.commit_cross_project_ref?
# all issues can be referenced/fixed
elsif issue