summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/introspection.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/postgresql/introspection.py')
-rw-r--r--django/db/backends/postgresql/introspection.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/django/db/backends/postgresql/introspection.py b/django/db/backends/postgresql/introspection.py
index 90b7090464..103adb50f6 100644
--- a/django/db/backends/postgresql/introspection.py
+++ b/django/db/backends/postgresql/introspection.py
@@ -78,9 +78,13 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
WHERE table_name = %s""", [table_name])
field_map = {line[0]: line[1:] for line in cursor.fetchall()}
cursor.execute("SELECT * FROM %s LIMIT 1" % self.connection.ops.quote_name(table_name))
- return [FieldInfo(*((force_text(line[0]),) + line[1:6]
- + (field_map[force_text(line[0])][0] == 'YES', field_map[force_text(line[0])][1])))
- for line in cursor.description]
+ return [
+ FieldInfo(*(
+ (force_text(line[0]),) +
+ line[1:6] +
+ (field_map[force_text(line[0])][0] == 'YES', field_map[force_text(line[0])][1])
+ )) for line in cursor.description
+ ]
def get_relations(self, cursor, table_name):
"""