Skip to content

Commit

Permalink
fix duplicate endpoint entity error (#69)
Browse files Browse the repository at this point in the history
Co-authored-by: Ronald Arias <ronald.arias@contractor.jupiterone.com>
  • Loading branch information
RonaldEAM and RonaldEAM authored Sep 1, 2023
1 parent 93d4541 commit c0b1a6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist
CHANGELOG.md
6 changes: 5 additions & 1 deletion src/steps/synchronize/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export async function synchronize({
);

await client.iterateComputers(async (computer: CiscoAmpComputer) => {
const computerEntity = await jobState.addEntity(convertComputer(computer));
const computerEntity = convertComputer(computer);
if (jobState.hasKey(computerEntity._key)) {
return;
}
await jobState.addEntity(computerEntity);
await jobState.addRelationship(
createDirectRelationship({
from: accountEntity,
Expand Down

0 comments on commit c0b1a6c

Please sign in to comment.