1.1 --- a/imipweb/resource.py Sat Aug 01 22:24:43 2015 +0200
1.2 +++ b/imipweb/resource.py Sat Aug 01 23:06:48 2015 +0200
1.3 @@ -128,32 +128,34 @@
1.4 return self.requests
1.5
1.6 def _get_request_summary(self):
1.7 +
1.8 + "Return a list of periods comprising the request summary."
1.9 +
1.10 summary = []
1.11 +
1.12 for uid, recurrenceid in self._get_requests():
1.13 obj = self.get_stored_object(uid, recurrenceid)
1.14 if obj:
1.15 - periods = obj.get_periods(self.get_tzid(), self.get_window_end())
1.16 recurrenceids = self._get_recurrences(uid)
1.17
1.18 - # Convert the periods to more substantial free/busy items.
1.19 + # Obtain only active periods, not those replaced by redefined
1.20 + # recurrences.
1.21
1.22 - for p in periods:
1.23 + for p in obj.get_active_periods(recurrenceids, self.get_tzid(), self.get_window_end()):
1.24
1.25 - # Subtract any recurrences from the free/busy details of a
1.26 - # parent object.
1.27 + # Convert the periods to more substantial free/busy items.
1.28
1.29 - if recurrenceid or not self.is_replaced(p, recurrenceids):
1.30 - summary.append(
1.31 - FreeBusyPeriod(
1.32 - p.get_start(),
1.33 - p.get_end(),
1.34 - uid,
1.35 - obj.get_value("TRANSP"),
1.36 - recurrenceid,
1.37 - obj.get_value("SUMMARY"),
1.38 - obj.get_value("ORGANIZER"),
1.39 - p.get_tzid()
1.40 - ))
1.41 + summary.append(
1.42 + FreeBusyPeriod(
1.43 + p.get_start(),
1.44 + p.get_end(),
1.45 + uid,
1.46 + obj.get_value("TRANSP"),
1.47 + recurrenceid,
1.48 + obj.get_value("SUMMARY"),
1.49 + obj.get_value("ORGANIZER"),
1.50 + p.get_tzid()
1.51 + ))
1.52 return summary
1.53
1.54 # Period and recurrence testing.