From e3f421496e1d6267998021f0851028761fbc642a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 20 Aug 2008 09:56:02 +0000
Subject: [PATCH] Person_getAvailableTimeMovementList should not return blocks
 with 0 length

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23053 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_calendar/Person_getAvailableTimeMovementList.xml       | 2 +-
 bt5/erp5_calendar/bt/revision                                   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/Person_getAvailableTimeMovementList.xml b/bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/Person_getAvailableTimeMovementList.xml
index 4d1b40dda1..660ad6fdbe 100644
--- a/bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/Person_getAvailableTimeMovementList.xml
+++ b/bt5/erp5_calendar/SkinTemplateItem/portal_skins/erp5_calendar/Person_getAvailableTimeMovementList.xml
@@ -117,7 +117,7 @@ def flush_list():\n
   for k in range(1, len(date_list)):\n
     stop_date = date_list[k]\n
     quantity = quantity_list[k-1]\n
-    if quantity > 0:\n
+    if quantity > 0 and start_date < stop_date:\n
       \n
       mov = mvt_list[k-1].asContext(\n
         start_date = start_date,\n
diff --git a/bt5/erp5_calendar/bt/revision b/bt5/erp5_calendar/bt/revision
index 5f1a9f39c2..f9c94c8318 100644
--- a/bt5/erp5_calendar/bt/revision
+++ b/bt5/erp5_calendar/bt/revision
@@ -1 +1 @@
-324
\ No newline at end of file
+325
\ No newline at end of file
-- 
2.30.9