1.1 --- a/tools/copy_store.py Fri Apr 22 15:03:16 2016 +0200
1.2 +++ b/tools/copy_store.py Fri Apr 22 15:03:43 2016 +0200
1.3 @@ -48,7 +48,9 @@
1.4
1.5 # Copy requests.
1.6
1.7 - to_store.set_requests(user, from_store.get_requests(user))
1.8 + requests = from_store.get_requests(user)
1.9 + if requests:
1.10 + to_store.set_requests(user, requests)
1.11
1.12 # Copy events, both active and cancellations.
1.13
1.14 @@ -79,16 +81,22 @@
1.15
1.16 # Copy free/busy information for the user.
1.17
1.18 - to_store.set_freebusy(user, from_store.get_freebusy(user))
1.19 + freebusy = from_store.get_freebusy(user)
1.20 + if freebusy:
1.21 + to_store.set_freebusy(user, freebusy)
1.22
1.23 # Copy free/busy information for other users.
1.24
1.25 for other in from_store.get_freebusy_others(user):
1.26 - to_store.set_freebusy_for_other(user, from_store.get_freebusy_for_other(user, other), other)
1.27 + freebusy = from_store.get_freebusy_for_other(user, other)
1.28 + if freebusy:
1.29 + to_store.set_freebusy_for_other(user, freebusy, other)
1.30
1.31 # Copy free/busy offers.
1.32
1.33 - to_store.set_freebusy_offers(user, from_store.get_freebusy_offers(user))
1.34 + offers = from_store.get_freebusy_offers(user)
1.35 + if offers:
1.36 + to_store.set_freebusy_offers(user, offers)
1.37
1.38 # For each quota group...
1.39