dakrauth / django-swingtime

📆 Event and occurrence scheduling application for Django
https://dakrauth.github.io/django-swingtime/
MIT License
313 stars 99 forks source link

Freeze when count = 0 is passed #11

Open siolag161 opened 9 years ago

siolag161 commented 9 years ago

When we set count=0 in add_occurrences it freezes!

Apparently the issue is with python-dateutils, like for example,

list(rrule.rrule(rrule.DAILY, dtstart=datetime(2010,1,1,1), count=0))

will likely cause the problem ( generate an infinite list of occurrences)

What do you think we should do?

dakrauth commented 9 years ago

I've added a simple tweak to check for false-y values for count and until in the rrule params