This commit is contained in:
seb
2026-10-09 18:10:49 +02:00
parent 848ca0aff5
commit daf2d0525f
10 changed files with 112 additions and 66 deletions

View File

@@ -360,9 +360,9 @@ export async function executeCompanyImport({
log.info(`Processing ${brandEntries.length} brands (Hersteller)...`);
// Fetch existing brands to accurately track new vs existing
const existingBrands = await store.brand.list(googleAuthId);
const { brands: existingBrandRows } = await store.brand.list(googleAuthId, { offset: 0, limit: 100 });
const existingBrandNames = new Set(
existingBrands.map((b) => (b.name || '').trim().toLowerCase()).filter(Boolean)
existingBrandRows.map((b) => (b.name || '').trim().toLowerCase()).filter(Boolean)
);
for (let i = 0; i < brandEntries.length; i++) {