Fixed update method not using transaction for reads

no-issue

Since we run our product repository methods in transactions now we must
ensure that all database interations in the method use the transaction.
This adds the missing options to the reading of existing prices so that
they happen inside of the transaction.
This commit is contained in:
Fabien O'Carroll 2021-09-01 19:10:12 +02:00
parent b0133b3c2e
commit 3b94ba7dce

View File

@ -311,7 +311,7 @@ class ProductRepository {
currency: data.monthly_price.currency,
type: 'recurring',
interval: 'month'
});
}, options);
let priceModel;
if (existingPrice) {
priceModel = existingPrice;
@ -358,7 +358,7 @@ class ProductRepository {
currency: data.yearly_price.currency,
type: 'recurring',
interval: 'year'
});
}, options);
let priceModel;
if (existingPrice) {