Ticket #2591: 2591.diff
File 2591.diff, 752 bytes (added by , 17 years ago) |
---|
-
django/db/backends/postgresql_psycopg2/introspection.py
31 31 relations = {} 32 32 for row in cursor.fetchall(): 33 33 try: 34 # row[0] and row[1] are like "{2}", so strip the curly braces.35 relations[int(row[0][ 1:-1]) - 1] = (int(row[1][1:-1]) - 1, row[2])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 36 except ValueError: 37 37 continue 38 38 return relations