From: Jonathan Ellis Date: Mon, 31 Jul 2006 21:00:48 +0000 (+0000) Subject: fix for when default is zero X-Git-Tag: rel_0_2_7~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e07d80642e7a25df47c97ef8ca6bce50ab18e099;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fix for when default is zero --- diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index 361705b716..b68bf99a72 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -178,7 +178,7 @@ class SQLiteDialect(ansisql.ANSIDialect): break #print "row! " + repr(row) found_table = True - (name, type, nullable, has_default, primary_key) = (row[1], row[2].upper(), not row[3], row[4], row[5]) + (name, type, nullable, has_default, primary_key) = (row[1], row[2].upper(), not row[3], row[4] is not None, row[5]) match = re.match(r'(\w+)(\(.*?\))?', type) coltype = match.group(1)