handle exception vevent without summary (#25887)
This commit is contained in:
parent
1866c43d2f
commit
639c8c295c
|
@ -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):
|
||||
|
|
|
@ -31,7 +31,6 @@ UID:950c3ff889d2465dd5d648c4c2194232c0a565f4
|
|||
DTSTART:20170830T180800Z
|
||||
DTEND:20170831T223400Z
|
||||
SEQUENCE:2
|
||||
SUMMARY:Event 2
|
||||
END:VEVENT
|
||||
END:VCALENDAR"""
|
||||
|
||||
|
|
Loading…
Reference in New Issue