summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-17 13:59:47 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-17 13:59:47 (GMT)
commit45dd176eba6898c5ead49efe20a5f951e8a5eb72 (patch)
treed5ac38767f7519788fe931e168f3f414e57868fd
parent71c1450337b64d1cb9b010b83e9cc543c01dee4c (diff)
downloadpykolab-45dd176eba6898c5ead49efe20a5f951e8a5eb72.tar.gz
Fix setter for event attendees; Avoid errors about missing _exceptions attribute
-rw-r--r--pykolab/xml/event.py14
-rw-r--r--pykolab/xml/todo.py1
2 files changed, 8 insertions, 7 deletions
diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py
index bff759d..398814f 100644
--- a/pykolab/xml/event.py
+++ b/pykolab/xml/event.py
@@ -702,13 +702,13 @@ class Event(object):
def get_transparency(self):
return self.event.transparency()
- def set_attendees(self, _attendees):
- self._attendees = _attendees
- self.event.setAttendees(self._attendees)
-
- # apply update to all exceptions
- for exception in self._exceptions:
- exception.merge_attendee_data(_attendees)
+ def set_attendees(self, _attendees, recursive=False):
+ if recursive:
+ self._attendees = []
+ self.update_attendees(_attendees, True)
+ else:
+ self._attendees = _attendees
+ self.event.setAttendees(self._attendees)
def set_attendee_participant_status(self, attendee, status, rsvp=None):
"""
diff --git a/pykolab/xml/todo.py b/pykolab/xml/todo.py
index 303dd63..adc4e2b 100644
--- a/pykolab/xml/todo.py
+++ b/pykolab/xml/todo.py
@@ -41,6 +41,7 @@ class Todo(Event):
def __init__(self, from_ical="", from_string=""):
self._attendees = []
self._categories = []
+ self._exceptions = []
self._attachment_parts = []
self.properties_map.update({