diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-10 19:26:00 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-10 19:26:00 -0800 |
commit | b758b4c80bacd655f0241375c2391028cfd73f77 (patch) | |
tree | 0111d09408fa9ec21e9c98fa5077a77794a86427 | |
parent | fe0174799d4fecc94a778f0145896f64f92f9015 (diff) | |
download | gitlab-ce-b758b4c80bacd655f0241375c2391028cfd73f77.tar.gz |
If noteable is nil - make discussion outdated
-rw-r--r-- | app/models/note.rb | 1 |
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 |