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
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
......
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