Commit 28aaef24 authored by Rubén Dávila's avatar Rubén Dávila Committed by Robert Speicher

Don't use `self` when looking for cross-references!

parent 169070ba
......@@ -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) }
......
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