diff options
Diffstat (limited to 'app/controllers/groups/labels_controller.rb')
-rw-r--r-- | app/controllers/groups/labels_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/groups/labels_controller.rb b/app/controllers/groups/labels_controller.rb index c5dd3e1df35..d1c32350b1d 100644 --- a/app/controllers/groups/labels_controller.rb +++ b/app/controllers/groups/labels_controller.rb @@ -16,7 +16,8 @@ class Groups::LabelsController < Groups::ApplicationController format.html do # at group level we do not want to list project labels, # we only want `only_group_labels = false` when pulling labels for label filter dropdowns, fetched through json - @labels = available_labels(params.merge(only_group_labels: true)).page(params[:page]) + @labels = available_labels(params.merge(only_group_labels: true)).includes(:group).page(params[:page]) # rubocop: disable CodeReuse/ActiveRecord + @labels.each { |label| label.lazy_subscription(current_user) } # preload subscriptions end format.json do render json: LabelSerializer.new.represent_appearance(available_labels) |