diff --git a/django/db/backends/sqlite3/introspection.py b/django/db/backends/sqlite3/introspection.py
index da8629a..f029715 100644
a
|
b
|
class DatabaseIntrospection(BaseDatabaseIntrospection):
|
79 | 79 | |
80 | 80 | # Schema for this table |
81 | 81 | cursor.execute("SELECT sql FROM sqlite_master WHERE tbl_name = %s AND type = %s", [table_name, "table"]) |
82 | | results = cursor.fetchone()[0].strip() |
| 82 | try: |
| 83 | results = cursor.fetchone()[0].strip() |
| 84 | except TypeError: |
| 85 | # It might be a view, then no results will be returned |
| 86 | return relations |
83 | 87 | results = results[results.index('(') + 1:results.rindex(')')] |
84 | 88 | |
85 | 89 | # Walk through and look for references to other tables. SQLite doesn't |