Django

Code

Changeset 5679

Show
Ignore:
Timestamp:
07/13/07 03:52:07 (1 year ago)
Author:
mtredinnick
Message:

Fixed #2591 -- Fixed a problem with inspectdb with psycopg2 (only). Patch from
Gary Wilson.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/db/backends/postgresql_psycopg2/introspection.py

    r5302 r5679  
    3232    for row in cursor.fetchall(): 
    3333        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]) 
    3636        except ValueError: 
    3737            continue