Fix(medusa): Missing location id on fulfillments (#3462)
**What** - include location id when creating a fulfillment - Allow location updates to reservations without passing along quantity **Why** - location_id on fulfillment was null after creation Fixes CORE-1242, CORE-1243
This commit is contained in:
@@ -166,7 +166,6 @@ export default class ReservationItemService extends TransactionBaseService {
|
||||
|
||||
const shouldUpdateLocation =
|
||||
isDefined(data.location_id) &&
|
||||
isDefined(data.quantity) &&
|
||||
data.location_id !== item.location_id
|
||||
|
||||
const ops: Promise<unknown>[] = []
|
||||
@@ -185,7 +184,7 @@ export default class ReservationItemService extends TransactionBaseService {
|
||||
.adjustReservedQuantity(
|
||||
item.inventory_item_id,
|
||||
data.location_id!,
|
||||
data.quantity!
|
||||
data.quantity || item.quantity!
|
||||
)
|
||||
)
|
||||
} else if (shouldUpdateQuantity) {
|
||||
|
||||
Reference in New Issue
Block a user