From 0c719c4831315e5d4c9be002f78b4db7d502cdcb Mon Sep 17 00:00:00 2001 From: Yi-Jacob Date: Mon, 20 May 2024 13:12:05 -0400 Subject: [PATCH] #237 - Updated payload logic --- .../df-service-details/df-service-details.component.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 ad09f635..9f17b1a0 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 @@ -284,8 +284,7 @@ export class DfServiceDetailsComponent implements OnInit { return; } const data = this.serviceForm.getRawValue(); - data.service_doc_by_service_id.content = this.serviceDefinition; - data.service_doc_by_service_id.format = Number(this.serviceDefinitionType); + type Params = { snackbarError: string; snackbarSuccess: string; @@ -304,6 +303,12 @@ export class DfServiceDetailsComponent implements OnInit { fields: '*', related: 'service_doc_by_service_id', }; + data.service_doc_by_service_id.content = this.serviceDefinition; + data.service_doc_by_service_id.format = Number( + this.serviceDefinitionType + ); + } else { + delete data.service_doc_by_service_id; // Remove service_doc_by_service_id if it's not a network service } if (this.edit) {