summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-12-02 13:41:54 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-12-02 13:41:54 +0100
commitaf4cdb83103f44eff05af2834a08f699b354a658 (patch)
tree93454f546e478be7ece248804ca904c07a44d99e
parent3337283f0784d7f438e273da9b8ab3a642ace168 (diff)
downloadpykolab-af4cdb83103f44eff05af2834a08f699b354a658.tar.gz
If neither the existing kolab event nor the incoming iTip event have any recurrence rules, they need to iterations either.
Reference T1988
-rw-r--r--pykolab/itip/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pykolab/itip/__init__.py b/pykolab/itip/__init__.py
index fe7db50..76eeb2a 100644
--- a/pykolab/itip/__init__.py
+++ b/pykolab/itip/__init__.py
@@ -167,6 +167,10 @@ def check_event_conflict(kolab_event, itip_event):
_ev = kolab_event
_ei = 0
+ # Escape looping through anything if neither of the events is recurring.
+ if not itip_event['xml'].is_recurring() and not kolab_event.is_recurring():
+ return check_date_conflict(_es, _ee, to_dt(itip_event['start']), to_dt(itip_event['end']))
+
# naive loops to check for collisions in (recurring) events
# TODO: compare recurrence rules directly (e.g. matching time slot or weekday or monthday)
while not conflict and _es is not None: