From dadc206d2cb1596604f0bb4182d28d58e9126905 Mon Sep 17 00:00:00 2001
From: gcarron <gcarron@grandlyon.com>
Date: Wed, 14 Dec 2022 16:03:20 +0100
Subject: [PATCH] fix: Wifi validation stops make structure incomplete

---
 src/app/utils/formUtils.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/utils/formUtils.ts b/src/app/utils/formUtils.ts
index ecec60dc6..d98605a92 100644
--- a/src/app/utils/formUtils.ts
+++ b/src/app/utils/formUtils.ts
@@ -158,7 +158,7 @@ export class formUtils {
         ]
       ),
       freeWorkShop: new UntypedFormControl(structure.freeWorkShop, [Validators.required]),
-      freeWifi: new UntypedFormControl(null, [Validators.required]), // Field used has a pivot, not sent in final form.
+      freeWifi: new UntypedFormControl(null, isEditMode ? [] : [Validators.required]), // Field used has a pivot, not sent in final form.
       dataShareConsentDate: new UntypedFormControl(structure.dataShareConsentDate),
       personalOffers: new UntypedFormControl(structure.personalOffers),
     });
-- 
GitLab