diff options
author | Claude Paroz <claude@2xlibre.net> | 2017-03-04 15:47:49 +0100 |
---|---|---|
committer | Claude Paroz <claude@2xlibre.net> | 2017-03-04 18:18:21 +0100 |
commit | 8346680e1ca4a8ddc8190baf3f5f944f6418d5cf (patch) | |
tree | ed12bc1d1077a65c1b32d410bc267266f6e3e4f9 /django/db/backends/postgresql/introspection.py | |
parent | 86de930f413e0ad902e11d78ac988e6743202ea6 (diff) | |
download | django-8346680e1ca4a8ddc8190baf3f5f944f6418d5cf.tar.gz |
Refs #27795 -- Removed unneeded force_text calls
Thanks Tim Graham for the review.
Diffstat (limited to 'django/db/backends/postgresql/introspection.py')
-rw-r--r-- | django/db/backends/postgresql/introspection.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/django/db/backends/postgresql/introspection.py b/django/db/backends/postgresql/introspection.py index 7e7091a613..0ec3bf7680 100644 --- a/django/db/backends/postgresql/introspection.py +++ b/django/db/backends/postgresql/introspection.py @@ -5,7 +5,6 @@ from django.db.backends.base.introspection import ( ) from django.db.models.indexes import Index from django.utils.deprecation import RemovedInDjango21Warning -from django.utils.encoding import force_text class DatabaseIntrospection(BaseDatabaseIntrospection): @@ -79,11 +78,8 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): 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 + FieldInfo(*(line[0:6] + (field_map[line.name][0] == 'YES', field_map[line.name][1]))) + for line in cursor.description ] def get_relations(self, cursor, table_name): |