Ticket #4183: django_contrib_admin_views_main.py.diff

File django_contrib_admin_views_main.py.diff, 675 bytes (added by anonymous, 18 years ago)
  • usr/lib/python2.5/site-packages/django/contrib/admin/views/main.py

     
    712712        except models.FieldDoesNotExist:
    713713            pass
    714714        else:
    715             if isinstance(f.rel, models.OneToOneRel):
     715            if isinstance(f.rel, models.OneToOneRel) or (isinstance(f, models.ForeignKey) and f.primary_key == True):
    716716                # For OneToOneFields, don't try to order by the related object's ordering criteria.
    717717                pass
    718718            elif isinstance(f.rel, models.ManyToOneRel):
Back to Top