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

Commit

Permalink
Merge pull request #42 from JupiterOne/INT-8940
Browse files Browse the repository at this point in the history
Removed duplicated keys in the grmembers step
  • Loading branch information
Gonzalo-Avalos-Ribas authored Jul 28, 2023
2 parents aa8be03 + 6b2757e commit f577ca8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/steps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ export async function buildGroupUserRelationships(
const client = new ServiceNowClient(instance.config, logger);

await client.iterateGroupMembers(async (groupMember) => {
await jobState.addRelationship(createGroupUserRelationship(groupMember));
if (
!jobState.hasKey(
`${groupMember.group.value}|has|${groupMember.user.value}`,
)
) {
await jobState.addRelationship(createGroupUserRelationship(groupMember));
}
});
}

Expand Down

0 comments on commit f577ca8

Please sign in to comment.