fix(medusa): Product export strategy (#1713)
This commit is contained in:
committed by
GitHub
parent
cc29b641c9
commit
89cb717461
@@ -4,36 +4,54 @@ exports[`/admin/batch-jobs GET /admin/batch-jobs lists batch jobs created by the
|
|||||||
Object {
|
Object {
|
||||||
"batch_jobs": Array [
|
"batch_jobs": Array [
|
||||||
Object {
|
Object {
|
||||||
|
"canceled_at": null,
|
||||||
|
"completed_at": null,
|
||||||
|
"confirmed_at": null,
|
||||||
"context": Object {},
|
"context": Object {},
|
||||||
"created_at": Any<String>,
|
"created_at": Any<String>,
|
||||||
"created_by": "admin_user",
|
"created_by": "admin_user",
|
||||||
"deleted_at": null,
|
"deleted_at": null,
|
||||||
"dry_run": false,
|
"dry_run": false,
|
||||||
|
"failed_at": null,
|
||||||
"id": "job_3",
|
"id": "job_3",
|
||||||
|
"pre_processed_at": null,
|
||||||
|
"processing_at": null,
|
||||||
"result": null,
|
"result": null,
|
||||||
"status": "created",
|
"status": "created",
|
||||||
"type": "product-export",
|
"type": "product-export",
|
||||||
"updated_at": Any<String>,
|
"updated_at": Any<String>,
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"canceled_at": null,
|
||||||
|
"completed_at": null,
|
||||||
|
"confirmed_at": null,
|
||||||
"context": Object {},
|
"context": Object {},
|
||||||
"created_at": Any<String>,
|
"created_at": Any<String>,
|
||||||
"created_by": "admin_user",
|
"created_by": "admin_user",
|
||||||
"deleted_at": null,
|
"deleted_at": null,
|
||||||
"dry_run": false,
|
"dry_run": false,
|
||||||
|
"failed_at": null,
|
||||||
"id": "job_2",
|
"id": "job_2",
|
||||||
|
"pre_processed_at": null,
|
||||||
|
"processing_at": null,
|
||||||
"result": null,
|
"result": null,
|
||||||
"status": "created",
|
"status": "created",
|
||||||
"type": "product-export",
|
"type": "product-export",
|
||||||
"updated_at": Any<String>,
|
"updated_at": Any<String>,
|
||||||
},
|
},
|
||||||
Object {
|
Object {
|
||||||
|
"canceled_at": null,
|
||||||
|
"completed_at": null,
|
||||||
|
"confirmed_at": null,
|
||||||
"context": Object {},
|
"context": Object {},
|
||||||
"created_at": Any<String>,
|
"created_at": Any<String>,
|
||||||
"created_by": "admin_user",
|
"created_by": "admin_user",
|
||||||
"deleted_at": null,
|
"deleted_at": null,
|
||||||
"dry_run": false,
|
"dry_run": false,
|
||||||
|
"failed_at": null,
|
||||||
"id": "job_1",
|
"id": "job_1",
|
||||||
|
"pre_processed_at": null,
|
||||||
|
"processing_at": null,
|
||||||
"result": null,
|
"result": null,
|
||||||
"status": "created",
|
"status": "created",
|
||||||
"type": "product-export",
|
"type": "product-export",
|
||||||
|
|||||||
@@ -57,6 +57,13 @@ export const defaultAdminBatchFields = [
|
|||||||
"created_at",
|
"created_at",
|
||||||
"updated_at",
|
"updated_at",
|
||||||
"deleted_at",
|
"deleted_at",
|
||||||
|
"confirmed_at",
|
||||||
|
"pre_processed_at",
|
||||||
|
"confirmed_at",
|
||||||
|
"processing_at",
|
||||||
|
"completed_at",
|
||||||
|
"canceled_at",
|
||||||
|
"failed_at",
|
||||||
]
|
]
|
||||||
|
|
||||||
export * from "./cancel-batch-job"
|
export * from "./cancel-batch-job"
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ export default class ProductExportStrategy extends AbstractBatchJobStrategy<
|
|||||||
imageCount
|
imageCount
|
||||||
)
|
)
|
||||||
|
|
||||||
for (const variant of product.variants) {
|
for (const variant of product?.variants ?? []) {
|
||||||
if (variant.prices?.length) {
|
if (variant.prices?.length) {
|
||||||
variant.prices.forEach((price) => {
|
variant.prices.forEach((price) => {
|
||||||
pricesData.add(
|
pricesData.add(
|
||||||
|
|||||||
Reference in New Issue
Block a user