[CalendarServer-changes] [14545] CalendarServer/branches/users/sagen/trashcan-5/txdav/common/ datastore/sql.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 9 19:34:41 PDT 2015


Revision: 14545
          http://trac.calendarserver.org//changeset/14545
Author:   sagen at apple.com
Date:     2015-03-09 19:34:41 -0700 (Mon, 09 Mar 2015)
Log Message:
-----------
loadChildren now no longer overrides an existing cached item

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

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 02:22:13 UTC (rev 14544)
+++ CalendarServer/branches/users/sagen/trashcan-5/txdav/common/datastore/sql.py	2015-03-10 02:34:41 UTC (rev 14545)
@@ -3448,8 +3448,9 @@
         results = (yield self._childClass.loadAllObjects(self))
         for result in results:
             key = self._childrenKey(result.isInTrash())
-            self._children[key][result.name()] = result
-            self._children[key][result._resourceID] = result
+            if result.name() not in self._children[key]:
+                self._children[key][result.name()] = result
+                self._children[key][result._resourceID] = result
         self._childrenLoaded = True
         returnValue(results)
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150309/e8060e87/attachment.html>


More information about the calendarserver-changes mailing list