diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-07-25 22:51:26 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-25 22:51:26 -0600 |
commit | 35ce7aae019462b5b39b89a4f900a0c100ff71bd (patch) | |
tree | eea8997116b141a89ebf700da92bc1fee32f4093 /app/models/note.rb | |
parent | aa26767897ebaa007b63bbb8ee7586534e94906a (diff) | |
download | gitlab-ce-35ce7aae019462b5b39b89a4f900a0c100ff71bd.tar.gz |
Use sha1 of discussion ID.
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 7668f3378e9..2c23e04e545 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -145,9 +145,9 @@ class Note < ActiveRecord::Base def discussion_id @discussion_id ||= if for_merge_request? - [:discussion, :note, id].join("-") + Digest::SHA1.hexdigest([:discussion, :note, id].join("-")) else - self.class.build_discussion_id(noteable_type, noteable_id || commit_id) + Digest::SHA1.hexdigest(self.class.build_discussion_id(noteable_type, noteable_id || commit_id)) end end |