From 16e37e0aa13904326e62d05a6a3956710765850b Mon Sep 17 00:00:00 2001
From: Juliana <juliana@le-filament.com>
Date: Wed, 15 Mar 2023 15:27:13 +0100
Subject: [PATCH] [FIX]Bug if no contact mail filled

---
 services/operation_services.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/services/operation_services.py b/services/operation_services.py
index f331ed4..1485c1e 100644
--- a/services/operation_services.py
+++ b/services/operation_services.py
@@ -631,7 +631,7 @@ class OperationsService(Component):
             "role": role,
             "id": operation.id,
             "name": operation.name,
-            "email": operation.sudo().mail_contact,
+            "email": operation.sudo().mail_contact or "",
         }
 
         return datas
@@ -737,7 +737,7 @@ class OperationsService(Component):
             },
             "id": {"type": "integer"},
             "name": {"type": "string"},
-            "email": {"type": "string"},
+            "email": {"type": "string", "nullable": True},
         }
 
     def _validator_get_doc(self):
-- 
GitLab