fix(medusa): pricing module list prices return type (#5715)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(medusa): alwyas add price_list_id and price_list to money_amounts when listing for pricing module
|
||||||
@@ -736,10 +736,12 @@ class PricingService extends TransactionBaseService {
|
|||||||
(pr) => pr.rule_type.rule_attribute === "region_id"
|
(pr) => pr.rule_type.rule_attribute === "region_id"
|
||||||
)?.value
|
)?.value
|
||||||
|
|
||||||
|
delete priceSetMoneyAmount.money_amount?.price_set_money_amount
|
||||||
const moneyAmount = {
|
const moneyAmount = {
|
||||||
...priceSetMoneyAmount.money_amount,
|
...priceSetMoneyAmount.money_amount,
|
||||||
region_id: null as null | string,
|
region_id: null as null | string,
|
||||||
price_list_id: priceSetMoneyAmount.price_list?.id,
|
price_list_id: priceSetMoneyAmount.price_list?.id ?? null,
|
||||||
|
price_list: priceSetMoneyAmount.price_list ?? null,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regionId) {
|
if (regionId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user