Compare commits

..
Author SHA1 Message Date
devops 093ae419d5 Merge branch 'fix/product-import-category-select' into main
Build and Push Medusa / Escaneo de Secretos (Gitleaks) (push) Successful in 22s
Build and Push Medusa / Construir y publicar Medusa (push) Successful in 16m51s
2026-09-04 04:35:28 +00:00
devops 2b0d50c3d0 fix(commerce-backend): traer name/title explicito en el importador
listProductCategories({})/listProductCollections({}) sin select
explicito devolvian name/title undefined (a diferencia de la capa HTTP
del Admin API, que si los trae completos por defecto) -- causaba un 500
"Cannot read properties of undefined (reading 'toLowerCase')" en
cualquier import real. Confirmado en vivo con una prueba de importacion
de 3 productos antes de este fix.

De paso, se agrega un filtro defensivo antes del .map() para que una
categoria/coleccion sin nombre no tumbe el import entero.
2026-09-04 04:35:20 +00:00
gitea-actions 8126bb3d81 chore(gitops): deploy Medusa v1.0.220 [skip ci] 2026-09-02 21:53:50 +00:00
devops dedf4f0963 Merge branch 'feat/product-import' into main
Build and Push Medusa / Escaneo de Secretos (Gitleaks) (push) Successful in 59s
Build and Push Medusa / Construir y publicar Medusa (push) Successful in 26m14s
2026-09-01 03:47:43 +00:00
devops 601378a77e chore: release v1.0.219 [skip ci] 2026-08-29 20:31:52 +00:00
3 changed files with 16 additions and 7 deletions

No files matched your search

@@ -116,8 +116,13 @@ export async function POST(req: MedusaRequest<{ csv: string }>, res: MedusaRespo
stockLocationService.listStockLocations({}), stockLocationService.listStockLocations({}),
fulfillmentService.listShippingProfiles({}), fulfillmentService.listShippingProfiles({}),
salesChannelService.listSalesChannels({}), salesChannelService.listSalesChannels({}),
productService.listProductCategories({}), // select explicito -- sin el, name/title llegaban undefined (el
productService.listProductCollections({}), // default de estos module services no siempre trae todos los
// escalares, a diferencia de la capa HTTP del Admin API, confirmado
// en vivo: la ruta /admin/product-categories con fields=id,name si
// los trae completos).
productService.listProductCategories({}, { select: ["id", "name"] }),
productService.listProductCollections({}, { select: ["id", "title"] }),
]); ]);
const locationId = locations[0]?.id; const locationId = locations[0]?.id;
@@ -131,8 +136,12 @@ export async function POST(req: MedusaRequest<{ csv: string }>, res: MedusaRespo
return; return;
} }
const categoryByName = new Map(categories.map((c) => [c.name.toLowerCase().trim(), c.id])); const categoryByName = new Map(
const collectionByName = new Map(collections.map((c) => [c.title.toLowerCase().trim(), c.id])); categories.filter((c) => c.name).map((c) => [c.name.toLowerCase().trim(), c.id]),
);
const collectionByName = new Map(
collections.filter((c) => c.title).map((c) => [c.title.toLowerCase().trim(), c.id]),
);
const results: RowResult[] = []; const results: RowResult[] = [];
@@ -65,7 +65,7 @@ spec:
memory: 64Mi memory: 64Mi
- name: migrations - name: migrations
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.218 image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.220
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: command:
- node - node
@@ -86,7 +86,7 @@ spec:
containers: containers:
- name: app - name: app
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.218 image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.220
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
envFrom: envFrom:
- configMapRef: - configMapRef:
@@ -25,7 +25,7 @@ spec:
runAsUser: 1001 runAsUser: 1001
containers: containers:
- name: app - name: app
image: gitea.cruzcloud.net/devops/ecommerce-frontend:v1.0.216 image: gitea.cruzcloud.net/devops/ecommerce-frontend:v1.0.219
env: env:
- name: HEADLESS_PROVIDER - name: HEADLESS_PROVIDER
value: medusa value: medusa