diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-14 11:38:06 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-14 11:38:06 +0000 |
commit | 8170384d808eb0712aedb32a1833e2cecc39ff1d (patch) | |
tree | eb291e0919ee510c266427c896eb7ed943c0e910 /app/controllers | |
parent | 7fbcdfb074a0ca92e3d35f6b3c4d78f1940f88ef (diff) | |
download | gitlab-ce-8170384d808eb0712aedb32a1833e2cecc39ff1d.tar.gz |
Revert "Merge branch 'revert-2c879643' into 'master'"
This reverts merge request !12633
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index c9e636fb65e..13f03e7e63e 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -227,7 +227,7 @@ class Projects::IssuesController < Projects::ApplicationController def issue return @issue if defined?(@issue) # The Sortable default scope causes performance issues when used with find_by - @noteable = @issue ||= @project.issues.find_by!(iid: params[:id]) + @noteable = @issue ||= @project.issues.where(iid: params[:id]).reorder(nil).take! return render_404 unless can?(current_user, :read_issue, @issue) |