diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-01 02:39:14 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-04-08 22:37:46 +0300 |
commit | b202b42cfee6bb8cf0c142c918c545f45464a29c (patch) | |
tree | bcdc1d30a4ec2c11fd4b388cac69a450051943e6 /app/models/legacy_diff_note.rb | |
parent | 3d1cade13f61115b63bf6dbda5a1f194ba54b24b (diff) |
Link to outdated diff in older MR version from outdated diff discussion
Diffstat (limited to 'app/models/legacy_diff_note.rb')
-rw-r--r-- | app/models/legacy_diff_note.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/legacy_diff_note.rb b/app/models/legacy_diff_note.rb index 9a77557ebcd..d7c627432d2 100644 --- a/app/models/legacy_diff_note.rb +++ b/app/models/legacy_diff_note.rb @@ -56,11 +56,12 @@ class LegacyDiffNote < Note # # If the note's current diff cannot be matched in the MergeRequest's current # diff, it's considered inactive. - def active? + def active?(diff_refs = nil) return @active if defined?(@active) return true if for_commit? return true unless diff_line return false unless noteable + return false if diff_refs && diff_refs != noteable_diff_refs noteable_diff = find_noteable_diff |