Permalink
Browse files

fix test, don't delete default collections on merge

  • Loading branch information...
1 parent e94c20d commit 120290926e2d915cddb37a1c63b56c73953c70b6 @glyph glyph committed Feb 16, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 txdav/caldav/datastore/util.py
@@ -319,10 +319,12 @@ def migrateHome(inHome, outHome, getComponent=lambda x: x.component(),
@return: a L{Deferred} that fires with C{None} when the migration is
complete.
"""
- yield outHome.removeCalendarWithName("calendar")
- if config.RestrictCalendarsToOneComponentType:
- yield outHome.removeCalendarWithName("tasks")
- yield outHome.removeCalendarWithName("inbox")
+ if not merge:
+ yield outHome.removeCalendarWithName("calendar")
+ if config.RestrictCalendarsToOneComponentType:
+ yield outHome.removeCalendarWithName("tasks")
+ yield outHome.removeCalendarWithName("inbox")
+
outHome.properties().update(inHome.properties())
inCalendars = yield inHome.calendars()
for calendar in inCalendars:

0 comments on commit 1202909

Please sign in to comment.