[CalendarServer-changes] [7061] CalendarServer/trunk/txdav/carddav/datastore/util.py

source_changes at macosforge.org source_changes at macosforge.org
Sun Feb 20 18:20:59 PST 2011


Revision: 7061
          http://trac.macosforge.org/projects/calendarserver/changeset/7061
Author:   sagen at apple.com
Date:     2011-02-20 18:20:59 -0800 (Sun, 20 Feb 2011)
Log Message:
-----------
Fix for addressbook migration -- object resources have read-only property stores now

Modified Paths:
--------------
    CalendarServer/trunk/txdav/carddav/datastore/util.py

Modified: CalendarServer/trunk/txdav/carddav/datastore/util.py
===================================================================
--- CalendarServer/trunk/txdav/carddav/datastore/util.py	2011-02-21 01:59:52 UTC (rev 7060)
+++ CalendarServer/trunk/txdav/carddav/datastore/util.py	2011-02-21 02:20:59 UTC (rev 7061)
@@ -86,10 +86,12 @@
     
             # Only the owner's properties are migrated, since previous releases of
             # addressbook server didn't have per-user properties.
-            (yield outAddressbook.addressbookObjectWithName(
-                addressbookObject.name())).properties().update(
-                    addressbookObject.properties())
+            outObject = yield outAddressbook.addressbookObjectWithName(
+                addressbookObject.name())
+            if outAddressbook.objectResourcesHaveProperties():
+                outObject.properties().update(addressbookObject.properties())
 
+
         except InternalDataStoreError:
             log.error("  Failed to migrate adress book object: %s/%s/%s" % (
                 inAddressbook.ownerHome().name(),
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110220/bd6501c8/attachment.html>


More information about the calendarserver-changes mailing list