From c02ef930f9934077b8089d3dee1b440ecd628b45 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 8 Aug 2024 08:58:37 -0400 Subject: [PATCH] #294 - Fix Script save issue --- .../df-service-details/df-service-details.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/adf-services/df-service-details/df-service-details.component.ts b/src/app/adf-services/df-service-details/df-service-details.component.ts index 2f5358d6..de2d0888 100644 --- a/src/app/adf-services/df-service-details/df-service-details.component.ts +++ b/src/app/adf-services/df-service-details/df-service-details.component.ts @@ -222,7 +222,7 @@ export class DfServiceDetailsComponent implements OnInit { data.config.serviceDefinition = data?.serviceDocByServiceId.content; } this.serviceData = data; - if (data.serviceDocByServiceId) { + if (data) { this.content = data.serviceDocByServiceId.content; } else { this.content = ''; @@ -407,15 +407,15 @@ export class DfServiceDetailsComponent implements OnInit { }; // data.service_doc_by_service_id = null; // data.config.content = this.serviceDefinition; - if (!data.config.serviceDefinition) { + if (!data.config) { data.service_doc_by_service_id = null; } else { data.service_doc_by_service_id.content = data.config.serviceDefinition; data.service_doc_by_service_id.format = Number( this.serviceDefinitionType ); + delete data.config.serviceDefinition; } - delete data.config.serviceDefinition; } else { delete data.service_doc_by_service_id; }