#34296: Formset validation does not consider models.UniqueConstraint
-------------------------------------+-------------------------------------
Reporter: Jannis | Owner: nobody
Vajen |
Type: Bug | Status: new
Component: Database | Version: 4.1
layer (models, ORM) | Keywords: formset,
Severity: Normal | constraints
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When saving a formset with data that violates the model's
`UniqueConstraint()`, no form validation error is reported during
`formset.is_valid()`. Instead an IntegrityError is raised during
`formset.save()`. This only happens with the rather new
`UniqueConstraint()`, the older method of using `Meta.unique_together`
doesn't suffer from this.
--
Ticket URL: <https://code.djangoproject.com/ticket/34296>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.