From 4ea1020f7ccfcaa774ff794f88f1f0460a0098b3 Mon Sep 17 00:00:00 2001 From: Gonzalo Avalos Ribas Date: Tue, 18 Jun 2024 10:26:38 -0300 Subject: [PATCH] Removed optional chaining from relationships --- src/steps/converters.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/steps/converters.ts b/src/steps/converters.ts index 91170a2..931edd4 100644 --- a/src/steps/converters.ts +++ b/src/steps/converters.ts @@ -107,7 +107,7 @@ export function createIncidentAssigneeRelationship( fromType: Entities.INCIDENT._type, fromKey: incident.sys_id, toType: Entities.USER._type, - toKey: incident.assigned_to?.value, + toKey: incident.assigned_to.value, }); } @@ -118,7 +118,7 @@ export function createGroupGroupRelationship( return createDirectRelationship({ _class: RelationshipClass.HAS, fromType: Entities.GROUP._type, - fromKey: groupLink?.value, + fromKey: groupLink.value, toType: Entities.GROUP._type, toKey: groupEntity._key, }); @@ -130,9 +130,9 @@ export function createGroupUserRelationship( return createDirectRelationship({ _class: RelationshipClass.HAS, fromType: Entities.GROUP._type, - fromKey: groupUser.group?.value, + fromKey: groupUser.group.value, toType: Entities.USER._type, - toKey: groupUser.user?.value, + toKey: groupUser.user.value, properties: convertCommonServiceNowProperties(groupUser), }); }