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 PS importer bug, tests

Steven Teyc4e99d703070
diff --git a/apps/web/lib/partnerstack/import-groups.ts b/apps/web/lib/partnerstack/import-groups.ts
index a62a86b22f..220e4175ba 100644
--- a/apps/web/lib/partnerstack/import-groups.ts
+++ b/apps/web/lib/partnerstack/import-groups.ts
@@ -38,11 +38,6 @@ export async function importGroups(payload: PartnerStackImportPayload) {
if (groups.length > 0) {
for (const group of groups) {
- // Default group is already created in the program creation
- if (group.default) {
- continue;
- }
-
await prisma.partnerGroup.upsert({
where: {
programId_slug: {
diff --git a/apps/web/lib/partnerstack/schemas.ts b/apps/web/lib/partnerstack/schemas.ts
index 491221e967..efe424e929 100644
--- a/apps/web/lib/partnerstack/schemas.ts
+++ b/apps/web/lib/partnerstack/schemas.ts
@@ -103,6 +103,6 @@ export const partnerStackCommission = z.object({
"scheduled",
]),
partnership: z.object({
- email: z.string(),
+ email: z.string().nullish(),
}),
});
diff --git a/apps/web/tests/workflows/award-bounty-workflow.test.ts b/apps/web/tests/workflows/award-bounty-workflow.test.ts
index 43a31b76f8..30cf2b8b57 100644
--- a/apps/web/tests/workflows/award-bounty-workflow.test.ts
+++ b/apps/web/tests/workflows/award-bounty-workflow.test.ts
@@ -50,6 +50,7 @@ describe.sequential("Workflow - AwardBounty", async () => {
body: {
name: "E2E Test Partner - Goal",
email: randomEmail(),
+ groupId: E2E_PARTNER_GROUP.id,
},
});
@@ -110,6 +111,7 @@ describe.sequential("Workflow - AwardBounty", async () => {
body: {
name: "E2E Test Partner - Not Reached",
email: randomEmail(),
+ groupId: E2E_PARTNER_GROUP.id,
},
});
@@ -183,6 +185,7 @@ describe.sequential("Workflow - AwardBounty", async () => {
body: {
name: "E2E Test Partner - Disabled",
email: randomEmail(),
+ groupId: E2E_PARTNER_GROUP.id,
},
});
@@ -241,6 +244,7 @@ describe.sequential("Workflow - AwardBounty", async () => {
body: {
name: "E2E Test Partner - No Dup",
email: randomEmail(),
+ groupId: E2E_PARTNER_GROUP.id,
},
});