Skip to content

Commit

Permalink
Merge pull request #238 from Yi-Jacob/issue/237-faulty-payload-logic
Browse files Browse the repository at this point in the history
#237 - Updated payload logic
  • Loading branch information
thekevinm authored May 20, 2024
2 parents c7ff418 + 0c719c4 commit ae50800
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 ae50800

Please sign in to comment.