[3.12 regression] don't access to __class__ directly, it may raise AttributeError
--- 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)