Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix index

Steven Teyaa073233250f
diff --git a/apps/web/lib/partnerstack/import-customers.ts b/apps/web/lib/partnerstack/import-customers.ts
index 38b0f16c92..257fd6ac58 100644
--- a/apps/web/lib/partnerstack/import-customers.ts
+++ b/apps/web/lib/partnerstack/import-customers.ts
@@ -162,16 +162,8 @@ async function createCustomer({
// Find the customer by email address
const customerFound = await prisma.customer.findFirst({
where: {
- OR: [
- {
- projectId: workspace.id,
- email: customer.email,
- },
- {
- projectId: workspace.id,
- externalId: customer.customer_key,
- },
- ],
+ projectId: workspace.id,
+ OR: [{ email: customer.email }, { externalId: customer.customer_key }],
},
});