Skip to content

Commit

Permalink
#237 - Updated payload logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Yi-Jacob committed May 20, 2024
1 parent c7ff418 commit 0c719c4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 0c719c4

Please sign in to comment.