summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-07-13 20:36:01 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-07-13 20:36:01 +0000
commit193e6db4577adef8ac5654c73a633b69ed823f1b (patch)
tree5609708a6eeff7a9ccf34e2c9ccd21a8df4ad576
parent92ee77077300529fded493aa34a64c8516abca18 (diff)
Refs #2591 -- Removed int conversion and try/except since the value in the single-item list is already an int. I overlooked this in my original patch, which was applied in [5679].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/db/backends/postgresql_psycopg2/introspection.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/django/db/backends/postgresql_psycopg2/introspection.py b/django/db/backends/postgresql_psycopg2/introspection.py
index 41df248068..a953368991 100644
--- a/django/db/backends/postgresql_psycopg2/introspection.py
+++ b/django/db/backends/postgresql_psycopg2/introspection.py
@@ -30,11 +30,8 @@ def get_relations(cursor, table_name):
AND con.contype = 'f'""", [table_name])
relations = {}
for row in cursor.fetchall():
- try:
- # row[0] and row[1] are single-item lists, so grab the single item.
- relations[int(row[0][0]) - 1] = (int(row[1][0]) - 1, row[2])
- except ValueError:
- continue
+ # row[0] and row[1] are single-item lists, so grab the single item.
+ relations[row[0][0] - 1] = (row[1][0] - 1, row[2])
return relations
def get_indexes(cursor, table_name):