1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

(bug) cannot generate order statistic if no set a category

This commit is contained in:
Du Peng 2022-10-18 12:45:03 +02:00
parent ebbbb47e67
commit 1dee7d6f93

View File

@ -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