Ticket #2348: query.py.diff

File query.py.diff, 759 bytes (added by Karen Tracey <kmtracey@…>, 18 years ago)
  • query.py

     
    836836                new_column = new_opts.pk.column
    837837                join_column = field.column
    838838
    839             raise FieldFound
     839            # If there are still items on path but this is not a related field, we're stuck.
     840            # Add first element of path to current field name so the TypeError raised
     841            # below properly identifies the cause of the problem.
     842            if path and not field.rel:
     843                name += LOOKUP_SEPARATOR + path[0]
     844            else:
     845                raise FieldFound
    840846
    841847    except FieldFound: # Match found, loop has been shortcut.
    842848        pass
Back to Top