Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
don't check for duplicate key
Browse files Browse the repository at this point in the history
  • Loading branch information
RonaldEAM committed Apr 12, 2024
1 parent 65bbbf3 commit 9bc7af3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/steps/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,11 @@ async function buildGroupEntityToUserRelationships(
}
const userKey = user.id;
if (jobState.hasKey(userKey)) {
const relationship = createGroupUserRelationship(
groupId,
userKey,
await jobState.addRelationship(
createGroupUserRelationship(groupId, userKey),
);
if (!jobState.hasKey(relationship._key)) {
await jobState.addRelationship(relationship);
stats.relationshipsCreated++;
statsLogger(`[${groupEntityType}] Added relationships`);
}
stats.relationshipsCreated++;
statsLogger(`[${groupEntityType}] Added relationships`);
} else {
logger.warn(
{ groupId, userId: userKey },
Expand Down

0 comments on commit 9bc7af3

Please sign in to comment.