mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #35275 -- Fixed Meta.constraints validation crash on UniqueConstraint with OpClass().
This also introduces Expression.constraint_validation_compatible that allows specifying that expression should be ignored during a constraint validation.
This commit is contained in:
committed by
Sarah Boyce
parent
ceaf1e2848
commit
f030236a86
@@ -1058,6 +1058,15 @@ calling the appropriate methods on the wrapped expression.
|
||||
Tells Django that this expression can be used in
|
||||
:attr:`Field.db_default`. Defaults to ``False``.
|
||||
|
||||
.. attribute:: constraint_validation_compatible
|
||||
|
||||
.. versionadded:: 5.1
|
||||
|
||||
Tells Django that this expression can be used during a constraint
|
||||
validation. Expressions with ``constraint_validation_compatible`` set
|
||||
to ``False`` must have only one source expression. Defaults to
|
||||
``True``.
|
||||
|
||||
.. attribute:: contains_aggregate
|
||||
|
||||
Tells Django that this expression contains an aggregate and that a
|
||||
|
||||
Reference in New Issue
Block a user