2015-05-17 | Paul Boddie | raw files shortlog changelog graph | Fixed single day event creation. | |
imipweb/calendar.py (file) |
1.1 --- a/imipweb/calendar.py Sun May 17 00:39:38 2015 +0200 1.2 +++ b/imipweb/calendar.py Sun May 17 00:40:01 2015 +0200 1.3 @@ -68,7 +68,7 @@ 1.4 last = None 1.5 1.6 for slot in slots: 1.7 - start, end = slot.split("-") 1.8 + start, end = (slot.split("-", 1) + [None])[:2] 1.9 start = get_datetime(start, {"TZID" : tzid}) 1.10 end = end and get_datetime(end, {"TZID" : tzid}) or get_start_of_next_day(start, tzid) 1.11