mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #34338 -- Fixed isolation of constraints tests.
Regression in 5b3d3e400a.
This commit is contained in:
@@ -34,7 +34,13 @@ class UniqueConstraintProduct(models.Model):
|
||||
|
||||
class Meta:
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=["name", "color"], name="name_color_uniq"),
|
||||
models.UniqueConstraint(
|
||||
fields=["name", "color"],
|
||||
name="name_color_uniq",
|
||||
# Custom message and error code are ignored.
|
||||
violation_error_code="custom_code",
|
||||
violation_error_message="Custom message",
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user