Fix MySQLdb to use time for TIME instead of timedelta

This commit is contained in:
Cédric Krier committed 2012-05-17 12:59:58 +02:00
1 parent 6cd2e51aa3
commit 7a39bbdd39
1 file changed
+1
+1
View File
@@ -42,6 +42,7 @@ class Database(DatabaseInterface):
def cursor(self, autocommit=False, readonly=False):
conv = MySQLdb.converters.conversions.copy()
conv[float] = lambda value, _: repr(value)
conv[MySQLdb.constants.FIELD_TYPE.TIME] = MySQLdb.times.Time_or_None
args = {
'db': self.database_name,
'sql_mode': 'traditional,postgresql',