CalDAV: minor rewrite of previous improvement
authorP. Christeas <p_christ@hol.gr>
Thu, 12 Aug 2010 11:08:38 +0000 (14:08 +0300)
committerP. Christeas <p_christ@hol.gr>
Thu, 12 Aug 2010 11:08:38 +0000 (14:08 +0300)
make it a little more readable.

bzr revid: p_christ@hol.gr-20100812110838-vmjlnnwopn0pr0j1

addons/caldav/calendar.py

index ab768f8..3836793 100644 (file)
@@ -235,7 +235,9 @@ class CalDAV(object):
         exdates = []
         for cal_data in child.getChildren():
             if cal_data.name.lower() == 'organizer':
-                self.ical_set(cal_data.name.lower(), cal_data.params.get('CN') and cal_data.params.get('CN')[0], 'value')
+                self.ical_set(cal_data.name.lower(),
+                        {'name': cal_data.params.get('CN', ['',])[0]},
+                        'value')
                 continue
             if cal_data.name.lower() == 'attendee':
                 ctx = context.copy()