From 774535053cd6cc4435af4588683fa224d0b2daae Mon Sep 17 00:00:00 2001 From: Gonzalo Avalos Ribas Date: Thu, 16 Nov 2023 11:27:21 -0300 Subject: [PATCH] Corected parameter - adding logs --- src/steps/profiles.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/steps/profiles.ts b/src/steps/profiles.ts index 851692e..9c5aeeb 100644 --- a/src/steps/profiles.ts +++ b/src/steps/profiles.ts @@ -67,26 +67,30 @@ export async function buildDeviceProfileRelationships({ const details = await apiClient.fetchProfilesDetails( profile.Id.Value?.toString(), ); + logger.info( + { detailKeys: Object.keys(details.general) }, + 'TEMP - detail keys.', + ); profileUUid = details.general.uuid; } if ( response.DeviceId.Uuid && - profile.Uuid && + profileUUid && jobState.hasKey(response.DeviceId.Uuid) && - jobState.hasKey(profile.Uuid) + jobState.hasKey(profileUUid) ) { await jobState.addRelationship( createDirectRelationship({ _class: DEVICE_PROFILE_REATIONSHIP_CLASS, fromKey: response.DeviceId.Uuid, fromType: DEVICE_ENTITY_TYPE, - toKey: profile.Uuid, + toKey: profileUUid, toType: PROFILE_ENTITY_TYPE, }), ); } else { logger.info( - { fromKey: response.DeviceId.Uuid, toKey: profile.Uuid }, + { fromKey: response.DeviceId.Uuid, toKey: profileUUid }, 'Could not create a relationship', ); }