summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-10 19:26:00 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-10 19:26:00 -0800
commitb758b4c80bacd655f0241375c2391028cfd73f77 (patch)
tree0111d09408fa9ec21e9c98fa5077a77794a86427
parentfe0174799d4fecc94a778f0145896f64f92f9015 (diff)
downloadgitlab-ce-b758b4c80bacd655f0241375c2391028cfd73f77.tar.gz
If noteable is nil - make discussion outdated
-rw-r--r--app/models/note.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 5996298be22..e99bc2668d6 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -296,6 +296,7 @@ class Note < ActiveRecord::Base
# If not - its outdated diff
def active?
return true unless self.diff
+ return false unless noteable
noteable.diffs.each do |mr_diff|
next unless mr_diff.new_path == self.diff.new_path