diff --git a/.changeset/nervous-countries-smell.md b/.changeset/nervous-countries-smell.md new file mode 100644 index 0000000000..f352cac6e1 --- /dev/null +++ b/.changeset/nervous-countries-smell.md @@ -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 diff --git a/packages/medusa/src/services/pricing.ts b/packages/medusa/src/services/pricing.ts index 79c0752fc7..811bd61b3f 100644 --- a/packages/medusa/src/services/pricing.ts +++ b/packages/medusa/src/services/pricing.ts @@ -736,10 +736,12 @@ class PricingService extends TransactionBaseService { (pr) => pr.rule_type.rule_attribute === "region_id" )?.value + delete priceSetMoneyAmount.money_amount?.price_set_money_amount const moneyAmount = { ...priceSetMoneyAmount.money_amount, 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) {