[CalendarServer-changes] [2284] CalendarServer/trunk/twistedcaldav/ical.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Apr 4 13:33:14 PDT 2008


Revision: 2284
          http://trac.macosforge.org/projects/calendarserver/changeset/2284
Author:   cdaboo at apple.com
Date:     2008-04-04 13:33:14 -0700 (Fri, 04 Apr 2008)

Log Message:
-----------
Fix logic for checking whether there is more than one master component in an iCalendar object.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/ical.py

Modified: CalendarServer/trunk/twistedcaldav/ical.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/ical.py	2008-04-03 23:32:10 UTC (rev 2283)
+++ CalendarServer/trunk/twistedcaldav/ical.py	2008-04-04 20:33:14 UTC (rev 2284)
@@ -844,6 +844,7 @@
         component_id  = None
         timezone_refs = set()
         timezones     = set()
+        got_master    = False
         
         for subcomponent in self.subcomponents():
             # Disallowed in CalDAV-Access-08, section 4.1
@@ -874,8 +875,11 @@
                         raise ValueError("Calendar resources may not contain components with different UIDs " +
                                          "(%s and %s found)" % (component_id, subcomponent.propertyValue("UID")))
                     elif subcomponent.propertyValue("Recurrence-ID") is None:
-                        raise ValueError("Calendar resources may not contain components with the same UIDs and no Recurrence-IDs" +
-                                         "(%s and %s found)" % (component_id, subcomponent.propertyValue("UID")))
+                        if got_master:
+                            raise ValueError("Calendar resources may not contain components with the same UIDs and no Recurrence-IDs" +
+                                             "(%s and %s found)" % (component_id, subcomponent.propertyValue("UID")))
+                        else:
+                            got_master = True
         
                 timezone_refs.update(subcomponent.timezoneIDs())
         

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080404/f75939d9/attachment-0001.html


More information about the calendarserver-changes mailing list