[CalendarServer-changes] [2229] CalendarServer/trunk/twistedcaldav/static.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 17 14:40:00 PDT 2008


Revision: 2229
          http://trac.macosforge.org/projects/calendarserver/changeset/2229
Author:   cdaboo at apple.com
Date:     2008-03-17 14:39:59 -0700 (Mon, 17 Mar 2008)

Log Message:
-----------
When a resource is directly accessed rathre than accessed via locateResource, it is possible that the
parents have not been provisioned. So provision any parents if they are missing.

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

Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py	2008-03-17 20:44:09 UTC (rev 2228)
+++ CalendarServer/trunk/twistedcaldav/static.py	2008-03-17 21:39:59 UTC (rev 2229)
@@ -411,6 +411,9 @@
 
         if hasattr(self, "parent"):
             parent = self.parent
+            if not parent.exists() and isinstance(parent, AutoProvisioningFileMixIn):
+                parent.provision()
+                
             assert parent.exists(), "Parent %s of %s does not exist" % (parent, self)
             assert parent.isCollection(), "Parent %s of %s is not a collection" % (parent, self)
 

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


More information about the calendarserver-changes mailing list