Merge branch 'fix/inventory-panel-ts-error' into main
Build and Push Medusa / Escaneo de Secretos (Gitleaks) (push) Successful in 25s
Build and Push Medusa / Construir y publicar Medusa (push) Successful in 18m56s

This commit is contained in:
devops committed 2026-08-29 18:59:55 +00:00
commit 578f085334
1 file changed
+2 -2
@@ -49,7 +49,7 @@ export async function GET(req: MedusaRequest, res: MedusaResponse) {
const variant = product.variants?.[0]; const variant = product.variants?.[0];
const inventoryItem = variant?.inventory_items?.[0]; const inventoryItem = variant?.inventory_items?.[0];
const level = inventoryItem?.inventory?.location_levels?.find( const level = inventoryItem?.inventory?.location_levels?.find(
(level: { location_id: string }) => level.location_id === locationId, (candidate) => candidate?.location_id === locationId,
); );
return { return {
productId: product.id, productId: product.id,
@@ -131,7 +131,7 @@ export async function POST(req: MedusaRequest<PanelUpdateBody>, res: MedusaRespo
} }
if (typeof quantity === "number" && inventoryItemId) { if (typeof quantity === "number" && inventoryItemId) {
const level = inventoryItem?.inventory?.location_levels?.find( const level = inventoryItem?.inventory?.location_levels?.find(
(level: { location_id: string }) => level.location_id === locationId, (candidate) => candidate?.location_id === locationId,
); );
await updateInventoryLevelsWorkflow(req.scope).run({ await updateInventoryLevelsWorkflow(req.scope).run({
input: { input: {