From 8346680e1ca4a8ddc8190baf3f5f944f6418d5cf Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 4 Mar 2017 15:47:49 +0100 Subject: Refs #27795 -- Removed unneeded force_text calls Thanks Tim Graham for the review. --- django/db/backends/postgresql/introspection.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'django/db/backends/postgresql/introspection.py') 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): -- cgit v1.2.1