Refer to unit from variant

variant_unit was moved to variant as part of product refactor.
Old products probably still had a value there, but new ones would have been appearing with nil.
This commit is contained in:
David Cook
2025-12-09 12:10:21 +11:00
parent 5dfef4a3ae
commit e121a799ed
2 changed files with 1 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ class AffiliateSalesQuery
<<~SQL.squish
spree_products.name AS product_name,
spree_variants.display_name AS unit_name,
spree_products.variant_unit AS unit_type,
spree_variants.variant_unit AS unit_type,
spree_variants.unit_value AS units,
spree_variants.unit_presentation,
spree_line_items.price,

View File

@@ -61,7 +61,6 @@ RSpec.describe AffiliateSalesQuery do
it "returns data" do
labelled_row = query.label_row(query.data(order1.distributor).first)
pending "unit_type"
expect(labelled_row).to include(
product_name: "Tomatoes",
unit_name: "Tomatoes - Roma",