Ticket #3938: 0.91-onetoone-admin-changelist-fix.patch
File 0.91-onetoone-admin-changelist-fix.patch, 878 bytes (added by , 18 years ago) |
---|
-
django/core/meta/__init__.py
1734 1734 # Sanity check -- Make sure the "parent" object exists. 1735 1735 # For example, make sure the Place exists for the Restaurant. 1736 1736 # Let the ObjectDoesNotExist exception propagate up. 1737 lookup_kwargs = opts.one_to_one_field.rel.limit_choices_to 1737 lookup_kwargs = opts.one_to_one_field.rel.limit_choices_to.copy() 1738 1738 lookup_kwargs['%s__exact' % opts.one_to_one_field.rel.field_name] = obj_key 1739 1739 _ = opts.one_to_one_field.rel.to.get_model_module().get_object(**lookup_kwargs) 1740 1740 params = dict([(f.attname, f.get_default()) for f in opts.fields])