Commit 4d6c51e2 authored by ZJ van de Weg's avatar ZJ van de Weg

Fix backend merge mistakes

[ci skip]
parent b40afae6
......@@ -303,7 +303,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
# Build a note object for comment form
@note = @project.notes.new(noteable: @merge_request)
@notes = @merge_request.mr_and_commit_notes.inc_author.fresh
@discussions = Note.discussions_from_notes(@notes)
@discussions = @notes.discussions
@noteable = @merge_request
# Get commits from repository
......
......@@ -193,7 +193,7 @@ class Note < ActiveRecord::Base
end
def award_emoji_supported?
noteable.is_a?(Awardable) && !for_diff_line?
noteable.is_a?(Awardable) && !line_code.present?
end
def contains_emoji_only?
......
......@@ -38,8 +38,6 @@
= markdown(note.note, pipeline: :note, cache_key: [note, "note"])
- if note_editable
= render 'projects/notes/edit_form', note: note
.note-awards
= render 'emoji_awards/awards_block', awardable: note, inline: false
= edited_time_ago_with_tooltip(note, placement: 'bottom', html_class: 'note_edited_ago', include_author: true)
- if note.attachment.url
......
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