handle exception vevent without summary (#25887)

This commit is contained in:
Thomas NOËL 2018-08-27 21:03:18 +02:00
parent 1866c43d2f
commit 639c8c295c
2 changed files with 4 additions and 2 deletions

View File

@ -493,7 +493,10 @@ class Desk(models.Model):
with transaction.atomic():
update_datetime = now()
for vevent in parsed.contents.get('vevent', []):
summary = force_text(vevent.contents['summary'][0].value)
if 'summary' in vevent.contents:
summary = force_text(vevent.contents['summary'][0].value)
else:
summary = _('Exception')
try:
start_dt = vevent.dtstart.value
if not isinstance(start_dt, datetime.datetime):

View File

@ -31,7 +31,6 @@ UID:950c3ff889d2465dd5d648c4c2194232c0a565f4
DTSTART:20170830T180800Z
DTEND:20170831T223400Z
SEQUENCE:2
SUMMARY:Event 2
END:VEVENT
END:VCALENDAR"""