From b172cbdf33c3eaea6a5c4a53da2ed0e46306a625 Mon Sep 17 00:00:00 2001 From: Jonathan Biemond Date: Thu, 18 Dec 2025 14:43:59 +0100 Subject: Fixed #36808 -- Required name argument in UniqueConstraint signature. By trading ValueError for TypeError for omitted name arguments, we gain a little clarity. --- tests/constraints/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/constraints/tests.py b/tests/constraints/tests.py index f988121528..39b170125f 100644 --- a/tests/constraints/tests.py +++ b/tests/constraints/tests.py @@ -1462,7 +1462,7 @@ class UniqueConstraintTests(TestCase): def test_requires_name(self): msg = "A unique constraint must be named." with self.assertRaisesMessage(ValueError, msg): - models.UniqueConstraint(fields=["field"]) + models.UniqueConstraint(fields=["field"], name="") def test_database_default(self): models.UniqueConstraint( -- cgit v1.3