[CalendarServer-changes] [2837] CalendarServer/branches/users/cdaboo/implicit-2805/twistedcaldav/ resource.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Aug 20 12:47:53 PDT 2008


Revision: 2837
          http://trac.macosforge.org/projects/calendarserver/changeset/2837
Author:   cdaboo at apple.com
Date:     2008-08-20 12:47:53 -0700 (Wed, 20 Aug 2008)
Log Message:
-----------
Fix error with handling of default scheduling calendar property that may not be present.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/implicit-2805/twistedcaldav/resource.py

Modified: CalendarServer/branches/users/cdaboo/implicit-2805/twistedcaldav/resource.py
===================================================================
--- CalendarServer/branches/users/cdaboo/implicit-2805/twistedcaldav/resource.py	2008-08-20 19:47:16 UTC (rev 2836)
+++ CalendarServer/branches/users/cdaboo/implicit-2805/twistedcaldav/resource.py	2008-08-20 19:47:53 UTC (rev 2837)
@@ -491,7 +491,7 @@
             
             # Also check the default calendar setting and remove it if the default is deleted
             default = (yield inbox.readProperty((caldav_namespace, "schedule-default-calendar-URL"), request))
-            if len(default.children) == 1:
+            if default and len(default.children) == 1:
                 defaultURL = normalizeURL(str(default.children[0]))
                 if normalizeURL(request.path) == defaultURL:
                     yield inbox.writeProperty(caldavxml.ScheduleDefaultCalendarURL())               
@@ -517,7 +517,7 @@
             
             # Also check the default calendar setting and remove it if the default is deleted
             default = (yield inbox.readProperty((caldav_namespace, "schedule-default-calendar-URL"), request))
-            if len(default.children) == 1:
+            if default and len(default.children) == 1:
                 defaultURL = normalizeURL(str(default.children[0]))
                 if normalizeURL(request.path) == defaultURL:
                     yield inbox.writeProperty(caldavxml.ScheduleDefaultCalendarURL(davxml.HRef(destination_path)))               
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080820/8129f33b/attachment.html 


More information about the calendarserver-changes mailing list