Merge pull request #12334 from dacook/buu/optimise

[BUU] Optimisation
This commit is contained in:
David Cook
2024-04-16 09:53:53 +10:00
committed by GitHub

View File

@@ -87,14 +87,16 @@ module Admin
# Optimise by pre-loading required columns
def product_query_includes
# TODO: add other fields used in columns? (eg supplier: [:name])
[
# variants: [
# :default_price,
# :stock_locations,
# :stock_items,
# :variant_overrides
# ]
:image,
:supplier,
{ variants: [
:default_price,
:primary_taxon,
:product,
:stock_items,
:tax_category,
] },
]
end