Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(medusa): Missing metadata field on order #10651

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading