Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

0.91-bugfixes: fix lookup kwarg corruption in certain types of one-to…

…-one listings. Thanks Tom Tobin for finally figuring this one out

git-svn-id: http://code.djangoproject.com/svn/django/branches/0.91-bugfixes@4936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f63faca4c64d07b0c48ca87b1a93c0eee2f375ca 1 parent 32b733c
James Bennett authored April 05, 2007

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/core/meta/__init__.py
2  django/core/meta/__init__.py
@@ -1734,7 +1734,7 @@ def manipulator_init(opts, add, change, self, obj_key=None, follow=None):
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])

0 notes on commit f63faca

Please sign in to comment.
Something went wrong with that request. Please try again.