summaryrefslogtreecommitdiff
path: root/tests/constraints/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/constraints/models.py')
-rw-r--r--tests/constraints/models.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/constraints/models.py b/tests/constraints/models.py
index 829f671cdd..95a29ffa4d 100644
--- a/tests/constraints/models.py
+++ b/tests/constraints/models.py
@@ -72,15 +72,13 @@ class GeneratedFieldVirtualProduct(models.Model):
class UniqueConstraintProduct(models.Model):
name = models.CharField(max_length=255)
color = models.CharField(max_length=32, null=True)
+ age = models.IntegerField(null=True)
class Meta:
constraints = [
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",
)
]