Skip to content

Commit

Permalink
add randomness
Browse files Browse the repository at this point in the history
  • Loading branch information
pKorsholm committed Dec 29, 2022
1 parent 2a21966 commit b7556fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const simpleProductVariantFactory = async (
const options = data.options || [{ option_id: "test-option", value: "Large" }]
for (const o of options) {
await manager.insert(ProductOptionValue, {
id: `${variant.id}-${o.option_id}`,
id: `${variant.id}-${o.option_id ?? Math.random()}`,
value: o.value,
variant_id: id,
option_id: o.option_id,
Expand Down

0 comments on commit b7556fe

Please sign in to comment.