pykolab/xml

Thomas Brüderli bruederli at kolabsys.com
Thu Mar 5 10:24:43 CET 2015


 pykolab/xml/event.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7c6686e2aec4c704fcfa5c9f58f8eedf44c3f1cd
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Tue Mar 3 01:39:41 2015 -0500

    Return the correct ical property for date-only recurrence-id

diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py
index ab643a5..1ccb097 100644
--- a/pykolab/xml/event.py
+++ b/pykolab/xml/event.py
@@ -643,7 +643,7 @@ class Event(object):
     def get_ical_recurrenceid(self):
         rid = self.get_recurrence_id()
         if isinstance(rid, datetime.datetime) or isinstance(rid, datetime.date):
-            prop = icalendar.vDatetime(rid)
+            prop = icalendar.vDate(rid) if isinstance(rid, datetime.date) else icalendar.vDatetime(rid)
             if self.thisandfuture:
                 prop.params.update({'RANGE':'THISANDFUTURE'})
             return prop




More information about the commits mailing list