summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-15 18:14:58 -0600
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 17:44:14 +0100
commitf6f6aaf593dc40c79b8e3536f5e2821c96b9dcd3 (patch)
tree2291c4c92889f11e1bdbabe640205debb1e88029 /app/models/note.rb
parent76aa0bedd7ed3aaaeab9402b78261917df66de10 (diff)
downloadgitlab-ce-f6f6aaf593dc40c79b8e3536f5e2821c96b9dcd3.tar.gz
Better notification emails for notes and (diff) discussions
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 6385747b571..06ceb60b982 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -261,7 +261,7 @@ class Note < ActiveRecord::Base
# Returns the entire discussion this note is part of
def discussion
if part_of_discussion?
- self.noteable.notes.find_discussion(self.discussion_id)
+ self.noteable.notes.find_discussion(self.discussion_id) || to_discussion
else
to_discussion
end