Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Refs #2591 -- Removed int conversion and try/except since the value i…

…n 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
  • Loading branch information...
commit 193e6db4577adef8ac5654c73a633b69ed823f1b 1 parent 92ee770
Gary Wilson Jr. authored July 13, 2007
7  django/db/backends/postgresql_psycopg2/introspection.py
@@ -30,11 +30,8 @@ def get_relations(cursor, table_name):
30 30
             AND con.contype = 'f'""", [table_name])
31 31
     relations = {}
32 32
     for row in cursor.fetchall():
33  
-        try:
34  
-            # row[0] and row[1] are single-item lists, so grab the single item.
35  
-            relations[int(row[0][0]) - 1] = (int(row[1][0]) - 1, row[2])
36  
-        except ValueError:
37  
-            continue
  33
+        # row[0] and row[1] are single-item lists, so grab the single item.
  34
+        relations[row[0][0] - 1] = (row[1][0] - 1, row[2])
38 35
     return relations
39 36
 
40 37
 def get_indexes(cursor, table_name):

0 notes on commit 193e6db

Please sign in to comment.
Something went wrong with that request. Please try again.