[CMF-checkins] CVS: CMF/CMFCalendar - Event.py:1.12

Tres Seaver tseaver@zope.com
Sat, 19 Oct 2002 12:10:16 -0400


Update of /cvs-repository/CMF/CMFCalendar
In directory cvs.zope.org:/tmp/cvs-serv16999

Modified Files:
	Event.py 
Log Message:


  - Merge Christian Theune's fix for funky default argument values on
    the Event's constructor and edit methods (collector #76).


=== CMF/CMFCalendar/Event.py 1.11 => 1.12 ===
--- CMF/CMFCalendar/Event.py:1.11	Tue Aug  6 20:11:12 2002
+++ CMF/CMFCalendar/Event.py	Sat Oct 19 12:10:16 2002
@@ -60,8 +60,8 @@
              , description=''
              , effective_date = None 
              , expiration_date = None 
-             , start_date = DateTime() 
-             , end_date = DateTime()
+             , start_date = None 
+             , end_date = None
              , location=''
              , contact_name=''
              , contact_email=''
@@ -121,8 +121,8 @@
                  , description=''
                  , effective_date = None 
                  , expiration_date = None 
-                 , start_date = DateTime()
-                 , end_date = DateTime()
+                 , start_date = None
+                 , end_date = None
                  , location=''
                  , contact_name=''
                  , contact_email=''
@@ -136,6 +136,11 @@
         self.effective_date = effective_date
         self.expiration_date = expiration_date
         self.setStartDate(start_date)
+
+        if start_date is None:
+            start_date = DateTime()
+        if end_date is None:
+            end_date = start_date
         
         if end_date < start_date:
             end_date = start_date