﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5322	Casting string to DateTime object does not check for existence of strftime.	pradeep.gowda@…	nobody	"Similar to #2192

patch :

{{{
Index: __init__.py
===================================================================
--- __init__.py (revision 6022)
+++ __init__.py (working copy)
@@ -534,7 +534,7 @@
 
     def get_db_prep_save(self, value):
         # Casts dates into string format for entry into database.
-        if value is not None:
+        if value is not None and hasattr(value, 'strftime'):
             value = value.strftime('%Y-%m-%d')
         return Field.get_db_prep_save(self, value)
}}}"		closed	contrib.admin	dev		duplicate			Unreviewed	1	0	0	0	0	0
