[CalendarServer-changes] [14034] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 1 03:34:05 PDT 2014


Revision: 14034
          http://trac.calendarserver.org//changeset/14034
Author:   cdaboo at apple.com
Date:     2014-10-01 03:34:05 -0700 (Wed, 01 Oct 2014)
Log Message:
-----------
Fix for broken tests.

Modified Paths:
--------------
    CalendarServer/trunk/requirements-dev.txt
    CalendarServer/trunk/txdav/caldav/datastore/sql.py

Modified: CalendarServer/trunk/requirements-dev.txt
===================================================================
--- CalendarServer/trunk/requirements-dev.txt	2014-10-01 10:18:32 UTC (rev 14033)
+++ CalendarServer/trunk/requirements-dev.txt	2014-10-01 10:34:05 UTC (rev 14034)
@@ -7,4 +7,4 @@
 mockldap
 q
 --editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVClientLibrary/trunk@13420#egg=CalDAVClientLibrary
---editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14029#egg=CalDAVTester
+--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14033#egg=CalDAVTester

Modified: CalendarServer/trunk/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql.py	2014-10-01 10:18:32 UTC (rev 14033)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql.py	2014-10-01 10:34:05 UTC (rev 14034)
@@ -1896,7 +1896,9 @@
     @inlineCallbacks
     def _groupModeAfterRemovingOneGroupSharee(self):
         """
-        return group mode after removing one group sharee or None
+        Return group mode after removing one group sharee or None.
+        Note that the group sharee entry still exists in the GROUP_SHAREE table when
+        this method is called.
         """
         # count group sharees that self is member of
         gs = schema.GROUP_SHAREE
@@ -1916,7 +1918,10 @@
                 )
             )
         ).on(self._txn, uid=self.viewerHome().uid())
-        if rows[0][0] > 0:
+
+        # Count greater than one means we will have at least one remaining group
+        # sharee after the one being removed is gone.
+        if rows[0][0] > 1:
             # no mode change for group shares
             result = {
                 _BIND_MODE_GROUP: _BIND_MODE_GROUP,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20141001/dc9afdeb/attachment.html>


More information about the calendarserver-changes mailing list