summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-02-20 10:43:59 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2015-02-20 10:43:59 (GMT)
commit7585ff3d3d9e7b33c3c5f1f075aab97d704565e0 (patch)
tree19b1b90a03494b67bb13b74d6c4f27b09009f5b8
parent05f1d4e5787acde1835337ca5dff4b86470fe53e (diff)
downloadpykolab-7585ff3d3d9e7b33c3c5f1f075aab97d704565e0.tar.gz
Don't attempt to update a None date
-rw-r--r--pykolab/xml/event.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py
index dbe938c..51ab620 100644
--- a/pykolab/xml/event.py
+++ b/pykolab/xml/event.py
@@ -1305,7 +1305,7 @@ class Event(object):
next_datetime = None
# next_datetime is always a cdatetime, convert to date if necessary
- if not isinstance(self.get_start(), datetime.datetime):
+ if next_datetime and not isinstance(self.get_start(), datetime.datetime):
next_datetime = datetime.date(next_datetime.year, next_datetime.month, next_datetime.day)
return next_datetime