Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
fix test, don't delete default collections on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph committed Feb 16, 2012
1 parent e94c20d commit 1202909
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions txdav/caldav/datastore/util.py
Expand Up @@ -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:
Expand Down

0 comments on commit 1202909

Please sign in to comment.