Author: phd
Date: 2006-10-10 10:23:53 -0600 (Tue, 10 Oct 2006)
New Revision: 1998
Modified:
SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py
Log:
Fixed the bug 1567633: KeyError when creating table from MySQL database.
Modified: SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py
===================================================================
--- SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py 2006-10-10 16:23:31 UTC (rev 1997)
+++ SQLObject/branches/0.7-bugfix/sqlobject/mysql/mysqlconnection.py 2006-10-10 16:23:53 UTC (rev 1998)
@@ -154,7 +154,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
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
|