diff --git a/app/controllers/admin/customers_controller.rb b/app/controllers/admin/customers_controller.rb index 91eda7d4a7..dac3b209dc 100644 --- a/app/controllers/admin/customers_controller.rb +++ b/app/controllers/admin/customers_controller.rb @@ -96,7 +96,10 @@ module Admin customer_tags = ::ActsAsTaggableOn::Tag. joins(:taggings). includes(:taggings). - where(taggings: { taggable_id: Customer.of(managed_enterprise_id), context: 'tags' }) + where(taggings: + { taggable_type: 'Customer', + taggable_id: Customer.of(managed_enterprise_id), + context: 'tags' }) customer_tags.each_with_object({}) do |tag, indexed_hash| customer_id = tag.taggings.first.taggable_id