Skip to content

Commit

Permalink
fix(medusa): Missing metadata field on order (#10651)
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermrbl authored Dec 18, 2024
1 parent 570c855 commit f3eca77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 6 additions & 0 deletions integration-tests/modules/__tests__/order/order.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ medusaIntegrationTestRunner({
const created = await orderModule.createOrders({
region_id: "test_region_id",
email: "[email protected]",
metadata: {
foo: "bar",
},
items: [
{
title: "Custom Item 2",
Expand Down Expand Up @@ -108,6 +111,9 @@ medusaIntegrationTestRunner({
payment_status: "not_paid",
region_id: "test_region_id",
fulfillments: [],
metadata: {
foo: "bar",
},
fulfillment_status: "not_fulfilled",
summary: expect.objectContaining({
// TODO: add all summary fields
Expand Down
8 changes: 1 addition & 7 deletions packages/medusa/src/api/admin/orders/query-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ export const defaultAdminOrderFields = [
]

export const defaultAdminRetrieveOrderFields = [
"id",
"display_id",
...defaultAdminOrderFields,
"region_id",
"status",
"version",
"summary",
"total",
"subtotal",
"tax_total",
Expand All @@ -36,8 +32,6 @@ export const defaultAdminRetrieveOrderFields = [
"original_shipping_tax_total",
"original_shipping_subtotal",
"original_shipping_total",
"created_at",
"updated_at",
"*items",
"*items.tax_lines",
"*items.adjustments",
Expand Down

0 comments on commit f3eca77

Please sign in to comment.