fix: Leads ohne Domain werden gefiltert und nicht gespeichert
Maps-Ergebnisse ohne Domain werden vor Speicherung herausgefiltert. sinkLeadsToVault überspringt Leads ohne Domain komplett. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,8 @@ export async function sinkLeadsToVault(
|
||||
const domain = lead.domain || null;
|
||||
const email = lead.email || null;
|
||||
|
||||
if (!domain) { skipped++; continue; } // no domain → skip entirely
|
||||
|
||||
if (domain) {
|
||||
// Strict domain dedup: one lead per domain
|
||||
const existing = await prisma.lead.findFirst({ where: { domain } });
|
||||
|
||||
Reference in New Issue
Block a user