Commit 5779f04b authored by Robert Speicher's avatar Robert Speicher

Merge remote-tracking branch 'ce/8-2-stable' into 8-2-stable-ee

parents 85d76e66 53c0b621
...@@ -59,8 +59,11 @@ class Projects::NotesController < Projects::ApplicationController ...@@ -59,8 +59,11 @@ class Projects::NotesController < Projects::ApplicationController
end end
def award_toggle def award_toggle
noteable = note_params[:noteable_type] == "issue" ? Issue : MergeRequest noteable = if note_params[:noteable_type] == "issue"
noteable = noteable.find_by!(id: note_params[:noteable_id], project: project) project.issues.find(note_params[:noteable_id])
else
project.merge_requests.find(note_params[:noteable_id])
end
data = { data = {
author: current_user, author: current_user,
......
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