Commit 568ce1ed authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix notes for commits inside MR being squashed in one discussion

parent 64fb2c59
...@@ -71,7 +71,6 @@ class NotesController < ProjectResourceController ...@@ -71,7 +71,6 @@ class NotesController < ProjectResourceController
# Helps to distinguish e.g. commit notes in mr notes list # Helps to distinguish e.g. commit notes in mr notes list
def note_for_main_target?(note) def note_for_main_target?(note)
note.for_wall? ||
(@target_type.camelize == note.noteable_type && !note.for_diff_line?) (@target_type.camelize == note.noteable_type && !note.for_diff_line?)
end end
end end
...@@ -88,7 +88,7 @@ class Note < ActiveRecord::Base ...@@ -88,7 +88,7 @@ class Note < ActiveRecord::Base
end end
def discussion_id def discussion_id
@discussion_id ||= [:discussion, noteable_type.try(:underscore), noteable_id, line_code].join("-").to_sym @discussion_id ||= [:discussion, noteable_type.try(:underscore), noteable_id || commit_id, line_code].join("-").to_sym
end end
# Returns true if this is a downvote note, # Returns true if this is a downvote note,
......
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