From 178033b70854a96014a536c96859bfc2956db9a8 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 16 Sep 2022 09:52:09 +0200 Subject: [PATCH] fix: force freeWorkshop value because it's now optional --- src/app/form/form-view/form-view.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/form/form-view/form-view.component.ts b/src/app/form/form-view/form-view.component.ts index c9874c160..965e77fc8 100644 --- a/src/app/form/form-view/form-view.component.ts +++ b/src/app/form/form-view/form-view.component.ts @@ -337,6 +337,9 @@ export class FormViewComponent implements OnInit { const user = await this.profileService.getProfile(); const newStructure = new Structure(this.structureForm.value); newStructure.hours = this.hoursForm.value; + if (!this.structureForm.value.freeWorkShop) { + newStructure.freeWorkShop = true; + } this.structureService.createStructure(newStructure, this.profile).subscribe((struct) => { if (user.job.hasPersonalOffer) { this.structure = struct; -- GitLab