diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-02-16 18:06:56 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-02-19 13:14:55 -0500 |
commit | 28aaef24adba2b39e0744d888b0e02c7bdb95c0b (patch) | |
tree | 76d68d9e86766deca158f4dbc5510c5f66ea15fe /app/models/commit.rb | |
parent | 169070ba4b83b1cbb4084abcf8ffeb9f492fcffa (diff) | |
download | gitlab-ce-28aaef24adba2b39e0744d888b0e02c7bdb95c0b.tar.gz |
Don't use `self` when looking for cross-references!
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index e8528782b59..bb997663cf4 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -247,7 +247,7 @@ class Commit def has_been_reverted?(current_user = nil, noteable = self) Gitlab::ReferenceExtractor.lazily do - [self, *noteable.notes].flat_map do |note| + noteable.notes.system.flat_map do |note| note.all_references(current_user).commits end end.any? { |commit_ref| commit_ref.reverts_commit?(self) } |