Commit b758b4c8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

If noteable is nil - make discussion outdated

parent fe017479
...@@ -296,6 +296,7 @@ class Note < ActiveRecord::Base ...@@ -296,6 +296,7 @@ class Note < ActiveRecord::Base
# If not - its outdated diff # If not - its outdated diff
def active? def active?
return true unless self.diff return true unless self.diff
return false unless noteable
noteable.diffs.each do |mr_diff| noteable.diffs.each do |mr_diff|
next unless mr_diff.new_path == self.diff.new_path next unless mr_diff.new_path == self.diff.new_path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment