OneToOneField doesn't validate if it's set
|Reported by:||Rudolph Froger||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When a user in the admin interface "forgets" to set the OneToOneField and saves the object, Django does not return a nice error message but throws an exception because Django tries to insert a record without the primary key set. Some kind of validation should be added to prevent this.