chore(medusa): Little improvement in draft order creation (#3374)

**What**
Only call line item service create once, instead of twice.
This commit is contained in:
Adrien de Peretti
2023-03-07 20:10:53 +01:00
committed by GitHub
parent d0d11307d2
commit 84e4489683
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
chore(medusa): Little improvement in draft order creation
+1 -1
View File
@@ -352,7 +352,7 @@ class DraftOrderService extends TransactionBaseService {
cart_id: createdCart.id,
}))
promises.push(lineItemServiceTx.create(toCreate))
itemsToCreate.push(...toCreate)
}
// custom line items can be added to a draft order