server/sqlutils.py
changeset 7221 dc79f1a3c6ed
parent 7166 dde161937d3e
child 7229 a60522259c2c
--- a/server/sqlutils.py	Wed Apr 13 11:46:00 2011 +0200
+++ b/server/sqlutils.py	Thu Apr 14 11:38:10 2011 +0200
@@ -275,7 +275,7 @@
                     value = self._binary(value)
                 # XXX needed for sqlite but I don't think it is for other backends
                 # Note: use is __class__ since issubclass(datetime, date)
-                elif atype in ('Datetime', 'TZDatetime') and value.__class__ is date:
+                elif atype in ('Datetime', 'TZDatetime') and type(value) is date:
                     value = todatetime(value)
                 elif atype == 'Date' and isinstance(value, datetime):
                     value = todate(value)