Commit f3bcdb39 authored by Yusei Tahara's avatar Yusei Tahara

Prevent infinite loop.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25501 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5a9c8e5d
...@@ -102,5 +102,11 @@ class PeriodicityLine(Path, PeriodicityLineMixin): ...@@ -102,5 +102,11 @@ class PeriodicityLine(Path, PeriodicityLineMixin):
while next_start_date <= to_date: while next_start_date <= to_date:
result.append((next_start_date, result.append((next_start_date,
self.getPeriodicityTermStopDate(next_start_date))) self.getPeriodicityTermStopDate(next_start_date)))
next_start_date = self.getNextPeriodicalDate(next_start_date)
new_next_start_date = self.getNextPeriodicalDate(next_start_date)
if new_next_start_date==next_start_date:
# prevent infinite loop.
break
else:
next_start_date = new_next_start_date
return result return result
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment