Opened 18 years ago

Closed 16 years ago

#1764 closed defect (worksforme)

OneToOneField doesn't validate if it's set

Reported by: Rudolph Froger Owned by: nobody
Component: Core (Other) Version: dev
Severity: major Keywords: 121-rewrite
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.
See:
http://groups.google.com/group/django-developers/browse_thread/thread/c1ec4105f3f4fa10

Change History (5)

comment:1 by Gary Wilson <gary.wilson@…>, 18 years ago

milestone: Version 0.92Version 1.0

0.92 is long gone.

comment:2 by (none), 17 years ago

milestone: Version 1.0

Milestone Version 1.0 deleted

comment:3 by Gary Wilson <gary.wilson@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

the model inheritance stuff is going to change this.

comment:4 by Jacob, 16 years ago

Keywords: 121-rewrite added

comment:5 by Ivan Giuliani, 16 years ago

Resolution: worksforme
Status: newclosed

Looks like if it works now.

Note: See TracTickets for help on using tickets.
Back to Top