diff --git a/app/services/statistics/concerns/store_orders_concern.rb b/app/services/statistics/concerns/store_orders_concern.rb index f5b44b77e..422c74502 100644 --- a/app/services/statistics/concerns/store_orders_concern.rb +++ b/app/services/statistics/concerns/store_orders_concern.rb @@ -16,6 +16,7 @@ module Statistics::Concerns::StoreOrdersConcern .where(orderable_type: 'Product') .map(&:orderable) .map(&:product_category) + .compact .map { |cat| { id: cat.id, name: cat.name } } .uniq end