0001-handle-exception-vevent-without-summary-25887.patch
chrono/agendas/models.py | ||
---|---|---|
493 | 493 |
with transaction.atomic(): |
494 | 494 |
update_datetime = now() |
495 | 495 |
for vevent in parsed.contents.get('vevent', []): |
496 |
summary = force_text(vevent.contents['summary'][0].value) |
|
496 |
if 'summary' in vevent.contents: |
|
497 |
summary = force_text(vevent.contents['summary'][0].value) |
|
498 |
else: |
|
499 |
summary = _('Exception') |
|
497 | 500 |
try: |
498 | 501 |
start_dt = vevent.dtstart.value |
499 | 502 |
if not isinstance(start_dt, datetime.datetime): |
tests/test_agendas.py | ||
---|---|---|
31 | 31 |
DTSTART:20170830T180800Z |
32 | 32 |
DTEND:20170831T223400Z |
33 | 33 |
SEQUENCE:2 |
34 |
SUMMARY:Event 2 |
|
35 | 34 |
END:VEVENT |
36 | 35 |
END:VCALENDAR""" |
37 | 36 | |
38 |
- |