Commit dc098fde authored by Douwe Maan's avatar Douwe Maan

Fix MR note discussion ID

parent ce8cb2f9
...@@ -268,7 +268,9 @@ class Note < ActiveRecord::Base ...@@ -268,7 +268,9 @@ class Note < ActiveRecord::Base
def build_discussion_id def build_discussion_id
if for_merge_request? 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 else
self.class.build_discussion_id(noteable_type, noteable_id || commit_id) self.class.build_discussion_id(noteable_type, noteable_id || commit_id)
end end
......
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