Ver código fonte

- correction de bug durant l'affichage du calendrier le jour d'un nouveau cycle

fanch 1 ano atrás
pai
commit
6794df3d3d
2 arquivos alterados com 3 adições e 1 exclusões
  1. 1 1
      setup.py
  2. 2 0
      src/baby/app/models/regle.py

+ 1 - 1
setup.py

@@ -29,7 +29,7 @@ def get_files(path):
 
 setup(
     name="baby",
-    version="0.2.2",
+    version="0.2.3",
     description="A short description of the project.",
     author="François GAUTRAIS",
     install_requires=install_requires,

+ 2 - 0
src/baby/app/models/regle.py

@@ -232,6 +232,8 @@ class Cycle:
         kwargs = {"user": user}
         if ref_date and ref_date > today:
             length = get_average_period_from_today(user, monthes, today)
+            if length is None:
+                return None
             ilength = round(length)
             offset =  int((date - regle.date).days / ilength) * ilength