1.1 --- a/imiptools/client.py Mon Oct 16 19:19:01 2017 +0200
1.2 +++ b/imiptools/client.py Mon Oct 16 20:45:25 2017 +0200
1.3 @@ -279,12 +279,7 @@
1.4 returned, not all periods defined by an event starting in the past.
1.5 """
1.6
1.7 - uid = obj.get_uid()
1.8 -
1.9 - if not obj.modifying:
1.10 - obj.set_modifying(self.store.get_active_recurrences(self.user, uid))
1.11 - if not obj.cancelling:
1.12 - obj.set_cancelling(self.store.get_cancelled_recurrences(self.user, uid))
1.13 + self.store.update_event_from_recurrences(self.user, obj)
1.14
1.15 return obj.get_updated_periods(
1.16 start=(future_only and self.get_window_start() or None),
2.1 --- a/imiptools/stores/common.py Mon Oct 16 19:19:01 2017 +0200
2.2 +++ b/imiptools/stores/common.py Mon Oct 16 20:45:25 2017 +0200
2.3 @@ -222,6 +222,24 @@
2.4
2.5 pass
2.6
2.7 + def update_event_from_recurrences(self, user, obj):
2.8 +
2.9 + """
2.10 + Apply separate recurrence information to the event stored by 'user'
2.11 + represented by 'obj'. Recurrences cannot be updated in this way and are
2.12 + not modified by this method.
2.13 + """
2.14 +
2.15 + if obj.get_recurrenceid():
2.16 + return
2.17 +
2.18 + uid = obj.get_uid()
2.19 +
2.20 + if not obj.modifying:
2.21 + obj.set_modifying(self.get_active_recurrences(user, uid))
2.22 + if not obj.cancelling:
2.23 + obj.set_cancelling(self.get_cancelled_recurrences(user, uid))
2.24 +
2.25 # Free/busy period providers, upon extension of the free/busy records.
2.26
2.27 def _get_freebusy_providers(self, user):