Django

Code

Changeset 2538

Show
Ignore:
Timestamp:
03/20/06 11:56:37 (2 years ago)
Author:
jacob
Message:

magic-removal: fixed #1489 - objects with 1-to-1 relations may be deleted in the admin (thanks, Christopher Lenz)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/contrib/admin/views/main.py

    r2530 r2538  
    406406        if isinstance(related.field.rel, models.OneToOne): 
    407407            try: 
    408                 sub_obj = getattr(obj, 'get_%s' % rel_opts_name)(
     408                sub_obj = getattr(obj, rel_opts_name
    409409            except ObjectDoesNotExist: 
    410410                pass