Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-04 10:58:12 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-04-04 10:58:12 +0400
commit568ce1edd7df2eaf511878ccc3b202fcad7931a3 (patch)
treec2d63ce850f220bd97719527311d9fa194b124ae /app
parent64fb2c595aec7a18c7487062971210b59c0a9628 (diff)
Fix notes for commits inside MR being squashed in one discussion
Diffstat (limited to 'app')
-rw-r--r--app/controllers/notes_controller.rb3
-rw-r--r--app/models/note.rb2
2 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb
index 000c7bbb641..15ca963f281 100644
--- a/app/controllers/notes_controller.rb
+++ b/app/controllers/notes_controller.rb
@@ -71,7 +71,6 @@ class NotesController < ProjectResourceController
# Helps to distinguish e.g. commit notes in mr notes list
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
diff --git a/app/models/note.rb b/app/models/note.rb
index baf0634cf62..8274b866568 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -88,7 +88,7 @@ class Note < ActiveRecord::Base
end
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
# Returns true if this is a downvote note,