From e4a8d3f5827b8bb88ed5324f32ec637211bb95a7 Mon Sep 17 00:00:00 2001
From: Juliana <juliana@le-filament.com>
Date: Wed, 19 Jul 2023 17:00:52 +0200
Subject: [PATCH] [FIX]Bug on date no dispo in app

---
 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 c8f27a2..7b2183b 100644
--- a/services/operation_services.py
+++ b/services/operation_services.py
@@ -100,7 +100,7 @@ class OperationsService(Component):
             cons_rate = round((power_tot[2] / power_tot[1]) * 100, 2)
             prod_rate = round((power_tot[2] / power_tot[0]) * 100, 2)
         except Exception:
-            power_tot = (0, 0)
+            power_tot = (0, 0, 0, None)
             cons_rate = prod_rate = 0
 
         nb_conso = (
@@ -709,7 +709,7 @@ class OperationsService(Component):
             "image": {"type": "string", "nullable": True},
             "conso_tot": {"type": "float"},
             "prod_tot": {"type": "float"},
-            "month": {"type": "date"},
+            "month": {"type": "date", "nullable": True},
             "conso_rate": {"type": "float"},
             "prod_rate": {"type": "float"},
             "news": {
-- 
GitLab