[CalendarServer-changes] [14547] CalendarServer/branches/users/sagen/trashcan-5/txdav

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 9 21:25:03 PDT 2015


Revision: 14547
          http://trac.calendarserver.org//changeset/14547
Author:   sagen at apple.com
Date:     2015-03-09 21:25:03 -0700 (Mon, 09 Mar 2015)
Log Message:
-----------
Fix more tests

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/trashcan-5/txdav/caldav/datastore/test/test_sql.py
    CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/sql.py

Modified: CalendarServer/branches/users/sagen/trashcan-5/txdav/caldav/datastore/test/test_sql.py
===================================================================
--- CalendarServer/branches/users/sagen/trashcan-5/txdav/caldav/datastore/test/test_sql.py	2015-03-10 03:35:16 UTC (rev 14546)
+++ CalendarServer/branches/users/sagen/trashcan-5/txdav/caldav/datastore/test/test_sql.py	2015-03-10 04:25:03 UTC (rev 14547)
@@ -524,7 +524,7 @@
             )
 
         supported_components = set()
-        self.assertEqual(len(toCalendars), 4)
+        self.assertEqual(len(toCalendars), 3)
         for calendar in toCalendars:
             if calendar.name() in ("inbox", "trash"):
                 continue

Modified: CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/sql.py	2015-03-10 03:35:16 UTC (rev 14546)
+++ CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/sql.py	2015-03-10 04:25:03 UTC (rev 14547)
@@ -3544,9 +3544,10 @@
             raise HomeChildNameNotAllowedError(name)
 
         child = yield self._childClass.create(self, name, externalID=externalID)
-        key = self._childrenKey(False)
-        self._children[key][name] = child
-        self._children[key][child._resourceID] = child
+        if child is not None:
+            key = self._childrenKey(False)
+            self._children[key][name] = child
+            self._children[key][child._resourceID] = child
         returnValue(child)
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150309/0e137dab/attachment.html>


More information about the calendarserver-changes mailing list