﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3188	OneToOne field - ChangeManipulator looks for related primary key	alex@…	nobody	"I am posting it as bug, I have already tried to post to django-developers, no feedback has been received.

Assume I relate django.contrib.auth.User to Customer using OneToOne relation. If I do this,
I am unable to edit this user via /admin since ChangeManipulator brings up this error:

{{{
Exception Type:         KeyError
Exception Value:        'user'
Exception Location:
        /usr/lib64/python2.4/site-packages/django/db/models/manipulators.py in
save, line 163
}}}

Obviously, this is because Manipulator tries to use related field ID as
for ForeignKey, but it
seems to be wrong approach, since with OneToOne field we should
directly search on User.

http://dpaste.com/4045/

I have tried to change the code to something like this:

http://dpaste.com/3858/

And it works fine for me. I am submitting this as working patch,
but I consider it to be a temp. solution only.
"	defect	closed	contrib.admin	dev	normal	invalid		alex@…	Accepted	1	0	1	0	0	0
