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 upsert-draft-bounty-submissions.ts

Steven Tey580eac7808c4
diff --git a/apps/web/lib/bounty/api/upsert-draft-bounty-submissions.ts b/apps/web/lib/bounty/api/upsert-draft-bounty-submissions.ts
index bc3a0a29b8..5de2d64e7c 100644
--- a/apps/web/lib/bounty/api/upsert-draft-bounty-submissions.ts
+++ b/apps/web/lib/bounty/api/upsert-draft-bounty-submissions.ts
@@ -110,7 +110,8 @@ export function planDraftBountySubmissionUpserts({
continue;
}
- if (existing.performanceCount !== performanceCount) {
+ // update if performanceCount changed or conditionMet (need to promote to submitted)
+ if (existing.performanceCount !== performanceCount || conditionMet) {
toUpdate.push({
id: existing.id,
performanceCount,