Skip to content

Commit 1672aba

Browse files
authored
Merge pull request #6211 from mozilla/mntor-4075-code-stage
fix: ensure email notification records can be successfully retried after failure
2 parents 94a8d02 + 3ba3545 commit 1672aba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/db/tables/email_notifications.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ async function addEmailNotification(newNotification: NewNotification) {
5050
return trx("email_notifications")
5151
.forUpdate()
5252
.insert(emailNotificationDb)
53+
.onConflict(["subscriber_id", "breach_id", "email"])
54+
.ignore()
5355
.returning("*");
5456
});
5557
return res[0];

0 commit comments

Comments
 (0)