Fix replace label references with links for group labels

parent 1fd84700
...@@ -39,7 +39,13 @@ module Banzai ...@@ -39,7 +39,13 @@ module Banzai
end end
def find_labels(project) def find_labels(project)
LabelsFinder.new(user, project_id: project.id).execute label_ids = []
label_ids << project.group.labels.select(:id) if project.group.present?
label_ids << project.labels.select(:id)
union = Gitlab::SQL::Union.new(label_ids)
Label.where("labels.id IN (#{union.to_sql})")
end end
# Parameters to pass to `Label.find_by` based on the given arguments # Parameters to pass to `Label.find_by` based on the given arguments
......
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