Ticket #7716: 7716-select-related.diff

File 7716-select-related.diff, 515 bytes (added by miracle2k, 16 years ago)
  • db/models/query.py

     
    778778    restricted = requested is not None
    779779    index_end = index_start + len(klass._meta.fields)
    780780    obj = klass(*row[index_start:index_end])
     781    if obj.pk is None:
     782        return None, index_end
    781783    for f in klass._meta.fields:
    782784        if not select_related_descend(f, restricted, requested):
    783785            continue
Back to Top