[CalendarServer-changes] [10013] CalendarServer/branches/users/gaya/sharedgroups
source_changes at macosforge.org
source_changes at macosforge.org
Thu Nov 8 19:47:32 PST 2012
Revision: 10013
http://trac.calendarserver.org//changeset/10013
Author: gaya at apple.com
Date: 2012-11-08 19:47:32 -0800 (Thu, 08 Nov 2012)
Log Message:
-----------
fix isShared()
Modified Paths:
--------------
CalendarServer/branches/users/gaya/sharedgroups/twistedcaldav/sharing.py
CalendarServer/branches/users/gaya/sharedgroups/txdav/carddav/datastore/sql.py
Modified: CalendarServer/branches/users/gaya/sharedgroups/twistedcaldav/sharing.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/twistedcaldav/sharing.py 2012-11-09 02:03:56 UTC (rev 10012)
+++ CalendarServer/branches/users/gaya/sharedgroups/twistedcaldav/sharing.py 2012-11-09 03:47:32 UTC (rev 10013)
@@ -235,7 +235,8 @@
@inlineCallbacks
def isShared(self, request):
""" Return True if this is an owner shared calendar collection """
- returnValue((yield self.isSpecialCollection(customxml.SharedOwner)) or bool((yield self._allInvitations())))
+ returnValue((yield self.isSpecialCollection(customxml.SharedOwner)) or
+ bool((yield self._allInvitations()))) # same as, len(SharedAs() + InvitedAs())
def setShare(self, share):
@@ -538,6 +539,9 @@
For legacy reasons, all invitations are all invited + shared (accepted, not direct).
Combine these two into a single sorted list so code is similar to that for legacy invite db
"""
+ if not self.exists():
+ returnValue([])
+
invitedHomeChildren = yield self._newStoreObject.asInvited()
if includeAccepted:
acceptedHomeChildren = yield self._newStoreObject.asShared()
Modified: CalendarServer/branches/users/gaya/sharedgroups/txdav/carddav/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/txdav/carddav/datastore/sql.py 2012-11-09 02:03:56 UTC (rev 10012)
+++ CalendarServer/branches/users/gaya/sharedgroups/txdav/carddav/datastore/sql.py 2012-11-09 03:47:32 UTC (rev 10013)
@@ -399,7 +399,7 @@
groupComponent.removeProperty(Property("X-ADDRESSBOOKSERVER-MEMBER", member))
groupObject.updateDatabase(groupComponent)
- return
+ returnValue(None)
# delete members table row for this object
groupIDs = yield Delete(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121108/a6220a29/attachment.html>
More information about the calendarserver-changes
mailing list