diff --git a/engines/dfc_provider/app/services/variant_fetcher.rb b/engines/dfc_provider/app/services/variant_fetcher.rb index 3947a12b65..e99eb8dd02 100644 --- a/engines/dfc_provider/app/services/variant_fetcher.rb +++ b/engines/dfc_provider/app/services/variant_fetcher.rb @@ -9,7 +9,7 @@ class VariantFetcher end def scope - Spree::Variant. + Spree::Variant.not_master. joins(product: :supplier). where('enterprises.id' => @enterprise.id) end diff --git a/engines/dfc_provider/spec/services/variant_fetcher_spec.rb b/engines/dfc_provider/spec/services/variant_fetcher_spec.rb index 8a7adebc15..84a916c43f 100644 --- a/engines/dfc_provider/spec/services/variant_fetcher_spec.rb +++ b/engines/dfc_provider/spec/services/variant_fetcher_spec.rb @@ -14,8 +14,6 @@ describe VariantFetcher do it "returns the variants of a supplier" do product = create(:product, supplier: enterprise) - pending "ignoring of the master variant" - # it currently returns two variants instead of one expect(subject.scope.count).to eq 1 expect(subject.scope).to eq product.variants end