summaryrefslogtreecommitdiff
path: root/pykolab/itip/__init__.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-02 17:57:32 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-02 17:57:32 (GMT)
commite0cdbb50abceae359934f6421445491315069ab7 (patch)
treee415d3bc985e34bf9c30d42afbabbfbc7102c016 /pykolab/itip/__init__.py
parent403257f86465a53237bb88fd6c7f2d292ab9f041 (diff)
downloadpykolab-e0cdbb50abceae359934f6421445491315069ab7.tar.gz
Store reservations for single occurrences with the same UID in one object (#4766)
Diffstat (limited to 'pykolab/itip/__init__.py')
-rw-r--r--pykolab/itip/__init__.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/pykolab/itip/__init__.py b/pykolab/itip/__init__.py
index a81015b..83c9fe1 100644
--- a/pykolab/itip/__init__.py
+++ b/pykolab/itip/__init__.py
@@ -184,10 +184,10 @@ def check_event_conflict(kolab_event, itip_event):
_iv = _ix
# iterate through all exceptions (non-recurring)
- elif _is is None and not itip_event['xml'].is_recurring() and itip_event['xml'].has_exceptions() and len(itip_event['xml'].get_exceptions()) > _ii:
- _ix = itip_event['xml'].get_exceptions()[_ii]
- _is = to_dt(_ix.get_start())
- _ie = to_dt(_ix.get_end())
+ elif _is is None and not itip_event['xml'].is_recurring() and len(itip_event['xml'].get_exceptions()) > _ii:
+ _iv = itip_event['xml'].get_exceptions()[_ii]
+ _is = to_dt(_iv.get_start())
+ _ie = to_dt(_iv.get_end())
_ii += 1
_es = to_dt(kolab_event.get_next_occurence(_es)) if kolab_event.is_recurring() else None
@@ -202,10 +202,10 @@ def check_event_conflict(kolab_event, itip_event):
_ev = _ex
# iterate through all exceptions (non-recurring)
- elif _es is None and not kolab_event.is_recurring() and kolab_event.has_exceptions() and len(kolab_event.get_exceptions()) > _ei:
- _ex = kolab_event.get_exceptions()[_ei]
- _es = to_dt(_ex.get_start())
- _ee = to_dt(_ex.get_end())
+ elif _es is None and not kolab_event.is_recurring() and len(kolab_event.get_exceptions()) > _ei:
+ _ev = kolab_event.get_exceptions()[_ei]
+ _es = to_dt(_ev.get_start())
+ _ee = to_dt(_ev.get_end())
_ei += 1
return conflict