[CalendarServer-changes] [5797] CalendarServer/branches/new-store/twistedcaldav/static.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jun 22 13:04:49 PDT 2010
Revision: 5797
http://trac.macosforge.org/projects/calendarserver/changeset/5797
Author: glyph at apple.com
Date: 2010-06-22 13:04:47 -0700 (Tue, 22 Jun 2010)
Log Message:
-----------
Detect when calendars are first created in order to update calendar-free-busy-set.
Modified Paths:
--------------
CalendarServer/branches/new-store/twistedcaldav/static.py
Modified: CalendarServer/branches/new-store/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/new-store/twistedcaldav/static.py 2010-06-22 19:35:25 UTC (rev 5796)
+++ CalendarServer/branches/new-store/twistedcaldav/static.py 2010-06-22 20:04:47 UTC (rev 5797)
@@ -1033,16 +1033,28 @@
# TODO: when calendar home gets a resourceID( ) method, remove
# the "id=record.uid" keyword from this call:
self.clientNotifier = ClientNotifier(self, id=record.uid)
- self._newStoreCalendarHome = (
- transaction.calendarHomeWithUID(record.uid, create=True)
- )
+ storeHome = transaction.calendarHomeWithUID(record.uid)
+ if storeHome is not None:
+ created = False
+ else:
+ storeHome = transaction.calendarHomeWithUID(
+ record.uid, create=True
+ )
+ created = True
+ self._newStoreCalendarHome = storeHome
CalDAVFile.__init__(self, path)
DirectoryCalendarHomeResource.__init__(self, parent, record)
-
from twistedcaldav.storebridge import _NewStorePropertiesWrapper
self._dead_properties = _NewStorePropertiesWrapper(
self._newStoreCalendarHome.properties()
)
+ if created:
+ # This is a bit of a hack. Really we ought to be always generating
+ # this URL live from a back-end method that tells us what the
+ # default calendar is.
+ inbox = self.getChild("inbox")
+ childURL = joinURL(self.url(), "calendar")
+ inbox.processFreeBusyCalendar(childURL, True)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100622/4198acd2/attachment.html>
More information about the calendarserver-changes
mailing list