#8795: unique_together validation fails on model forms that exclude unique
fields
----------------------------------------+-----------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: new | Milestone: 1.0
Component: Forms | Version: SVN
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------+-----------------------------------
Comment (by julien):
My call here is "don't do that". You shouldn't save the form if you know
the model instance can't be complete. It's actually normal that it fails:
the form is valid, the instance is not.
If for example you had a required field your model, but that was excluded
in the form. `form.save()` would also fail, and for a good reason.
I would use `form.save(commit=False)` in your code instead, and then
manually fix the problematic fields.
--
Ticket URL: <http://code.djangoproject.com/ticket/8795#comment:3>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---