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
This commit is contained in:
parent
92ee770773
commit
193e6db457
|
@ -30,11 +30,8 @@ def get_relations(cursor, table_name):
|
||||||
AND con.contype = 'f'""", [table_name])
|
AND con.contype = 'f'""", [table_name])
|
||||||
relations = {}
|
relations = {}
|
||||||
for row in cursor.fetchall():
|
for row in cursor.fetchall():
|
||||||
try:
|
|
||||||
# row[0] and row[1] are single-item lists, so grab the single item.
|
# 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])
|
relations[row[0][0] - 1] = (row[1][0] - 1, row[2])
|
||||||
except ValueError:
|
|
||||||
continue
|
|
||||||
return relations
|
return relations
|
||||||
|
|
||||||
def get_indexes(cursor, table_name):
|
def get_indexes(cursor, table_name):
|
||||||
|
|
Loading…
Reference in New Issue