Modified: CalendarServer/trunk/twistedcaldav/schedule.py (1469 => 1470)
--- CalendarServer/trunk/twistedcaldav/schedule.py 2007-04-11 03:16:10 UTC (rev 1469)
+++ CalendarServer/trunk/twistedcaldav/schedule.py 2007-04-11 03:48:11 UTC (rev 1470)
@@ -105,6 +105,7 @@
),
)
+ @deferredGenerator
def writeProperty(self, property, request):
assert isinstance(property, davxml.WebDAVElement)
@@ -119,8 +120,22 @@
(caldav_namespace, "valid-calendar-data")
))
- return super(ScheduleInboxResource, self).writeProperty(property, request)
+ elif property.qname() == (caldav_namespace, "calendar-free-busy-set"):
+ for href in property.children:
+ cal = waitForDeferred(request.locateResource(str(href)))
+ yield cal
+ cal = cal.getResult()
+ if cal is None or not cal.exists() or not isCalendarCollectionResource(cal):
+ # Validate that href's point to a valid calendar.
+ raise HTTPError(ErrorResponse(
+ responsecode.CONFLICT,
+ (caldav_namespace, "valid-calendar-url")
+ ))
+ d = waitForDeferred(super(ScheduleInboxResource, self).writeProperty(property, request))
+ yield d
+ yield d.getResult()
+
class ScheduleOutboxResource (CalendarSchedulingCollectionResource):
"""
CalDAV schedule Outbox resource.