diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-06-01 09:05:21 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-06-01 09:52:11 -0500 |
commit | 34fcade1fd104deecaba69dc050cf2dcabb9e866 (patch) | |
tree | 26dc1481a2ffbfd2f464811ea7f0d4558733598a /app/models/discussion.rb | |
parent | c72abcefe79dd906cbbf0088b442a8979e9fc746 (diff) | |
download | gitlab-ce-34fcade1fd104deecaba69dc050cf2dcabb9e866.tar.gz |
Fix replying to a commit discussion displayed in the context of an MR
Diffstat (limited to 'app/models/discussion.rb')
-rw-r--r-- | app/models/discussion.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/discussion.rb b/app/models/discussion.rb index 9b32d573387..d1cec7613af 100644 --- a/app/models/discussion.rb +++ b/app/models/discussion.rb @@ -85,6 +85,12 @@ class Discussion first_note.discussion_id(context_noteable) end + def reply_id + # To reply to this discussion, we need the actual discussion_id from the database, + # not the potentially overwritten one based on the noteable. + first_note.discussion_id + end + alias_method :to_param, :id def diff_discussion? |