Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed small bug in manipulator handling of one-to-one-related foreign…

… keys

git-svn-id: http://code.djangoproject.com/svn/django/trunk@572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 299c3cdd8c5c83a2936cf84dc9d6745db9b39454 1 parent 2ce7806
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  django/core/meta/__init__.py
  2. +1 −1  django/views/admin/main.py
View
2  django/core/meta/__init__.py
@@ -1456,7 +1456,7 @@ def manipulator_save(opts, klass, add, change, self, new_data):
params[f.column] = f.get_manipulator_new_data(new_data)
if change:
- params[opts.pk.name] = self.obj_key
+ params[opts.pk.column] = self.obj_key
# First, save the basic object itself.
new_object = klass(**params)
View
2  django/views/admin/main.py
@@ -876,7 +876,7 @@ def change_stage(request, app_label, module_name, object_id):
new_data.setlist(f.name, new_data[f.name].split(","))
manipulator.do_html2python(new_data)
new_object = manipulator.save(new_data)
- pk_value = getattr(new_object, opts.pk.name)
+ pk_value = getattr(new_object, opts.pk.column)
# Construct the change message.
change_message = []
Please sign in to comment.
Something went wrong with that request. Please try again.