Ticket #4088: newcolumn.diff

File newcolumn.diff, 576 bytes (added by no@…, 8 years ago)
  • django/db/models/query.py

     
    923923            if field.rel: # One-to-One/Many-to-one field
    924924                new_table = current_table + '__' + name
    925925                new_opts = field.rel.to._meta
    926                 new_column = new_opts.pk.column
     926                new_column = field.rel.field_name
    927927                join_column = field.column
    928928                raise FieldFound
    929929            elif path:
Back to Top