1.1 --- a/imipweb/event.py Sat May 16 18:26:23 2015 +0200
1.2 +++ b/imipweb/event.py Sat May 16 18:26:55 2015 +0200
1.3 @@ -24,7 +24,7 @@
1.4 from imiptools.data import get_uri, uri_dict, uri_values
1.5 from imiptools.dates import format_datetime, to_date, get_datetime, \
1.6 get_datetime_item, get_period_item, \
1.7 - to_timezone, to_utc_datetime
1.8 + to_recurrence_start, to_timezone, to_utc_datetime
1.9 from imiptools.mail import Messenger
1.10 from imiptools.period import have_conflict
1.11 from imipweb.data import EventPeriod, \
1.12 @@ -67,13 +67,16 @@
1.13 def get_recurrence_key(self, period):
1.14 return format_datetime(to_utc_datetime(period.get_start(), self.get_tzid()))
1.15
1.16 + def get_recurrence_keys(self, recurrenceids):
1.17 + return [to_recurrence_start(s, self.get_tzid()) for s in recurrenceids]
1.18 +
1.19 def is_replaced(self, period, recurrenceids):
1.20 start_utc = self.get_recurrence_key(period)
1.21 - return recurrenceids and start_utc in recurrenceids and "replaced" or ""
1.22 + return recurrenceids and start_utc in self.get_recurrence_keys(recurrenceids) and "replaced" or ""
1.23
1.24 def is_affected(self, period, recurrenceid):
1.25 start_utc = self.get_recurrence_key(period)
1.26 - return recurrenceid and start_utc == recurrenceid and "affected" or ""
1.27 + return recurrenceid and start_utc == to_recurrence_start(recurrenceid, self.get_tzid()) and "affected" or ""
1.28
1.29 # Request logic methods.
1.30