diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-18 17:27:41 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-18 17:27:41 -0500 |
commit | dc098fde969cc8f268ce495f1265e88dab10a88a (patch) | |
tree | 0dc59433310050551b6aa8dfb0c01db34dc457d3 /app/models/note.rb | |
parent | ce8cb2f93668407d5457defe023d77abb9a89b85 (diff) | |
download | gitlab-ce-dc098fde969cc8f268ce495f1265e88dab10a88a.tar.gz |
Fix MR note discussion ID
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index d01a0c4ce02..79f7a247fba 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -268,7 +268,9 @@ class Note < ActiveRecord::Base def build_discussion_id if for_merge_request? - [:discussion, :note, id].join("-") + # Notes on merge requests are always in a discussion of their own, + # so we generate a unique discussion ID. + [:discussion, :note, SecureRandom.hex].join("-") else self.class.build_discussion_id(noteable_type, noteable_id || commit_id) end |