This commit is contained in:
seb
2026-10-20 23:25:47 +02:00
parent 70c7d5eff2
commit 07206674c1
5 changed files with 33 additions and 41 deletions

View File

@@ -144,10 +144,8 @@ async function importRow(row, { ensureCategory, ensureBrand }) {
// Create the article under the leaf category.
const createRes = await article.create({ categoryId: leafCategoryId, name });
requireObject(createRes, 'POST /api/article');
const created = createRes.article;
requireDefined(created, 'article');
requireDefined(created.sku, 'article.sku');
const sku = created.sku;
requireDefined(createRes.sku, 'sku');
const sku = createRes.sku;
const applied = { sku, artNr: row.artNr || null, name };