Skip to content

Commit

Permalink
frontend form fix empty type_site_config
Browse files Browse the repository at this point in the history
  • Loading branch information
joelclems committed Dec 7, 2023
1 parent 0378edf commit 243574f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,12 @@ export class MonitoringFormComponent implements OnInit {
for (const typeSite of typeSiteObj) {
this.idsTypesSite.push(typeSite.id_nomenclature_type_site);
this.typesSiteConfig[typeSite.label] = typeSite;
keysConfigToExclude.push(
...Object.keys(this.typesSiteConfig[typeSite.label].config.specific)
);
Object.assign(this.schemaUpdate, this.typesSiteConfig[typeSite.label].config.specific);
if (this.typesSiteConfig[typeSite.label].config?.specific) {
keysConfigToExclude.push(
...Object.keys(this.typesSiteConfig[typeSite.label].config.specific)
);
Object.assign(this.schemaUpdate, this.typesSiteConfig[typeSite.label].config.specific);
}
}
if (!this.obj.id) {
this.schemaUpdate = keysConfigToExclude
Expand Down

0 comments on commit 243574f

Please sign in to comment.