summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-06 23:29:19 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-06 23:29:19 (GMT)
commit06794d2351ee9db2b62aaacf554d4671e9174b80 (patch)
treedc9419eb86520763365009911241c58182f33324
parent644a18cba9af53c90d770dfa29ce4601e278c667 (diff)
downloadpykolab-06794d2351ee9db2b62aaacf554d4671e9174b80.tar.gz
Fix cloning attendees (name got lost)
-rw-r--r--pykolab/xml/attendee.py2
-rw-r--r--pykolab/xml/contact_reference.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/pykolab/xml/attendee.py b/pykolab/xml/attendee.py
index 087e832..a6384e9 100644
--- a/pykolab/xml/attendee.py
+++ b/pykolab/xml/attendee.py
@@ -110,7 +110,7 @@ class Attendee(kolabformat.Attendee):
if isinstance(obj, kolabformat.Attendee):
self.contactreference = ContactReference(obj.contact())
self.email = self.contactreference.get_email()
- kolabformat.Attendee.__init__(self, self.contactreference)
+ self.setContact(self.contactreference)
# manually copy all properities, copy constructor doesn't work :-(
self.setRSVP(obj.rsvp())
diff --git a/pykolab/xml/contact_reference.py b/pykolab/xml/contact_reference.py
index 5a832da..42d9919 100644
--- a/pykolab/xml/contact_reference.py
+++ b/pykolab/xml/contact_reference.py
@@ -18,13 +18,13 @@ class ContactReference(kolabformat.ContactReference):
'uid': 'uid',
}
- def __init__(self, email=None):
+ def __init__(self, email=None, name=""):
if email == None:
kolabformat.ContactReference.__init__(self)
elif isinstance(email, kolabformat.ContactReference):
kolabformat.ContactReference.__init__(self, email.email(), email.name(), email.uid())
else:
- kolabformat.ContactReference.__init__(self, email)
+ kolabformat.ContactReference.__init__(self, email, name)
def get_email(self):
return self.email()
@@ -36,7 +36,7 @@ class ContactReference(kolabformat.ContactReference):
self.setName(value)
def set_email(self, email):
- kolabformat.ContactReference.__init__(self, email)
+ kolabformat.ContactReference.__init__(self, email, self.name(), self.uid())
def set_name(self, name):
self.setName(name)