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.

Update create-partner-commission.ts

Kiran K83164c21bed4
diff --git a/apps/web/lib/partners/create-partner-commission.ts b/apps/web/lib/partners/create-partner-commission.ts
index 7667b0552c..4805da1295 100644
--- a/apps/web/lib/partners/create-partner-commission.ts
+++ b/apps/web/lib/partners/create-partner-commission.ts
@@ -101,8 +101,8 @@ export const createPartnerCommission = async ({
});
if (firstCommission) {
- // the partner reward has been changed since the first commission was created
- // make sure the new reward has the same max duration as the original reward
+ // partner's reward was updated after the first commission.
+ // make sure it wasn't changed from one-time to recurring so we don't create a new commission
if (
firstCommission.rewardId &&
firstCommission.rewardId !== reward.id