Skip to content

Commit 83c0f96

Browse files
committed
fix: issue where webhook contained duplicate record IDs
1 parent 73a98d0 commit 83c0f96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/repositories/DataRecord.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,11 @@ export const markDataRecordsAsDirty = async (
307307
batch: string[],
308308
dataSourceId: string,
309309
) => {
310+
const deduplicated = Array.from(new Set(batch));
310311
await db
311312
.insertInto("dataRecord")
312313
.values(
313-
batch.map((id) => ({
314+
deduplicated.map((id) => ({
314315
externalId: id,
315316
dataSourceId,
316317
json: {},

0 commit comments

Comments
 (0)