From d1a21900f0e713155d4f2cf29a161e8695826aca Mon Sep 17 00:00:00 2001 From: deaflynx Date: Fri, 7 Apr 2023 12:00:38 +0300 Subject: [PATCH] DeviceProfileProvisionConfigurationComponent writeValue set certificateValue as provisionDeviceSecret --- .../device-profile-provision-configuration.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui-ngx/src/app/modules/home/components/profile/device-profile-provision-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device-profile-provision-configuration.component.ts index 1ad497ddbb..54a9b98aa5 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device-profile-provision-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device-profile-provision-configuration.component.ts @@ -143,6 +143,9 @@ export class DeviceProfileProvisionConfigurationComponent implements ControlValu writeValue(value: DeviceProvisionConfiguration | null): void { if (isDefinedAndNotNull(value)) { + if (value.type === DeviceProvisionType.X509_CERTIFICATE_CHAIN) { + value.certificateValue = value.provisionDeviceSecret; + } this.provisionConfigurationFormGroup.patchValue(value, {emitEvent: false}); } else { this.provisionConfigurationFormGroup.patchValue({type: DeviceProvisionType.DISABLED});