Thread: [SQL-CVS] r1997 - SQLObject/trunk/sqlobject/mysql
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2006-10-10 16:23:39
|
Author: phd Date: 2006-10-10 10:23:31 -0600 (Tue, 10 Oct 2006) New Revision: 1997 Modified: SQLObject/trunk/sqlobject/mysql/mysqlconnection.py Log: Fixed the bug 1567633: KeyError when creating table from MySQL database. Modified: SQLObject/trunk/sqlobject/mysql/mysqlconnection.py =================================================================== --- SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2006-10-10 14:59:56 UTC (rev 1996) +++ SQLObject/trunk/sqlobject/mysql/mysqlconnection.py 2006-10-10 16:23:31 UTC (rev 1997) @@ -190,7 +190,7 @@ if field == 'id': continue colClass, kw = self.guessClass(t) - if self.kw['use_unicode'] and colClass is col.StringCol: + if self.kw.get('use_unicode') and colClass is col.StringCol: colClass = col.UnicodeCol if self.dbEncoding: kw['dbEncoding'] = self.dbEncoding kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field) |