summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 590fd338fd9..94d45aa43db 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -183,6 +183,8 @@ class Note < ActiveRecord::Base
# If exists - its active discussion
# If not - its outdated diff
def active?
+ return true unless self.diff
+
noteable.diffs.each do |mr_diff|
next unless mr_diff.new_path == self.diff.new_path