hotfix(medusa): wrap update-product in transaction (#182)
This commit is contained in:
committed by
GitHub
parent
999e8053ea
commit
ed5b1592a4
@@ -90,8 +90,11 @@ export default async (req, res) => {
|
||||
|
||||
try {
|
||||
const productService = req.scope.resolve("productService")
|
||||
const entityManager = req.scope.resolve("manager")
|
||||
|
||||
await productService.update(id, value)
|
||||
await entityManager.transaction(async manager => {
|
||||
await productService.withTransaction(manager).update(id, value)
|
||||
})
|
||||
|
||||
const product = await productService.retrieve(id, {
|
||||
select: defaultFields,
|
||||
|
||||
Reference in New Issue
Block a user