[Erp5-report] r12940 - /erp5/trunk/products/ERP5Form/FormulatorPatch.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 21 17:17:04 CET 2007
Author: romain
Date: Wed Feb 21 17:17:01 2007
New Revision: 12940
URL: http://svn.erp5.org?rev=12940&view=rev
Log:
DateTimeField can now have the empty string as default value.
Modified:
erp5/trunk/products/ERP5Form/FormulatorPatch.py
Modified: erp5/trunk/products/ERP5Form/FormulatorPatch.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/FormulatorPatch.py?rev=12940&r1=12939&r2=12940&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/FormulatorPatch.py (original)
+++ erp5/trunk/products/ERP5Form/FormulatorPatch.py Wed Feb 21 17:17:01 2007
@@ -746,7 +746,10 @@
if not hasattr(field, 'sub_form'):
field.sub_form = create_datetime_text_sub_form()
- if value is None and field.get_value('default_now'):
+ # Is it still usefull to test the None value,
+ # as DateTimeField should be considerer as the other field
+ # and get an empty string as default value?
+ if value in (None, '') and field.get_value('default_now'):
value = DateTime()
year = None
month = None
More information about the Erp5-report
mailing list