This commit is contained in:
Gaetan Craig-Riou
2024-02-26 20:53:27 +11:00
parent 47faedc295
commit 17fe492bf4

View File

@@ -14,7 +14,7 @@ FactoryBot.define do
primary_taxon { Spree::Taxon.first || FactoryBot.create(:taxon) }
supplier { Enterprise.is_primary_producer.first || FactoryBot.create(:supplier_enterprise) }
# createing a product here will end up creating an extra variant, as creating product will
# creating a product here will end up creating an extra variant, as creating product will
# create a "standard variant" by default. We could try to pass the variant instance we
# are creating but it fails because then the variant instance gets saved and it fails because
# the product isn't associated yet. It's a chicken and egg problem.