diff options
| author | Hannes Ljungberg <hannes.ljungberg@gmail.com> | 2021-12-04 21:03:38 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-12-06 07:59:11 +0100 |
| commit | 1eaf38fa87384fe26d1abf6e389d6df1600d4d8c (patch) | |
| tree | ca6d2b877127ca1ea1f76d8e36dc51d708996474 /docs/ref | |
| parent | d3a64bea51676fcf8a0ae593cf7b103939e12c87 (diff) | |
Fixed #33335 -- Made model validation ignore functional unique constraints.
Regression in 3aa545281e0c0f9fac93753e3769df9e0334dbaa.
Thanks Hervé Le Roy for the report.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/constraints.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/ref/models/constraints.txt b/docs/ref/models/constraints.txt index d604ec30d3..17d5c3362b 100644 --- a/docs/ref/models/constraints.txt +++ b/docs/ref/models/constraints.txt @@ -35,10 +35,12 @@ option. not raise ``ValidationError``\s. Rather you'll get a database integrity error on ``save()``. ``UniqueConstraint``\s without a :attr:`~UniqueConstraint.condition` (i.e. non-partial unique constraints) - are different in this regard, in that they leverage the existing - ``validate_unique()`` logic, and thus enable two-stage validation. In - addition to ``IntegrityError`` on ``save()``, ``ValidationError`` is also - raised during model validation when the ``UniqueConstraint`` is violated. + and :attr:`~UniqueConstraint.expressions` (i.e. non-functional unique + constraints) are different in this regard, in that they leverage the + existing ``validate_unique()`` logic, and thus enable two-stage validation. + In addition to ``IntegrityError`` on ``save()``, ``ValidationError`` is + also raised during model validation when the ``UniqueConstraint`` is + violated. ``CheckConstraint`` =================== |
