diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-04-21 23:43:35 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-04-21 23:43:35 +0000 |
| commit | 5866875547515bd8a1f7082404414602cf112355 (patch) | |
| tree | fc77cdf8f4e39c11c06c400772ffe2ab0696e964 /django/db/backends/sqlite3 | |
| parent | b5dc7945bd7de5bc2784d69a5e82e7fc1f069de8 (diff) | |
Fixed #13396 -- Modified the SQLite introspection code to avoid a problem with unconsumed cursors on PyPy. Thanks to Alex Gaynor for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/sqlite3')
| -rw-r--r-- | django/db/backends/sqlite3/introspection.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/sqlite3/introspection.py b/django/db/backends/sqlite3/introspection.py index ce64908873..c243e58c8e 100644 --- a/django/db/backends/sqlite3/introspection.py +++ b/django/db/backends/sqlite3/introspection.py @@ -66,7 +66,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): relations = {} # Schema for this table - cursor.execute("SELECT sql FROM sqlite_master WHERE tbl_name = %s", [table_name]) + cursor.execute("SELECT sql FROM sqlite_master WHERE tbl_name = %s AND type = %s", [table_name, "table"]) results = cursor.fetchone()[0].strip() results = results[results.index('(')+1:results.rindex(')')] |
