From cf21fc9bf010c71385dbead215d26151fb70d2ad Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 7 Apr 2020 10:54:19 +0200 Subject: Enforced uniqueness of natural keys used in tests. --- tests/serializers/models/natural.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/serializers') diff --git a/tests/serializers/models/natural.py b/tests/serializers/models/natural.py index 8f0bc48648..88bfed566b 100644 --- a/tests/serializers/models/natural.py +++ b/tests/serializers/models/natural.py @@ -24,7 +24,7 @@ class FKDataNaturalKey(models.Model): class NaturalKeyThing(models.Model): - key = models.CharField(max_length=100) + key = models.CharField(max_length=100, unique=True) other_thing = models.ForeignKey('NaturalKeyThing', on_delete=models.CASCADE, null=True) other_things = models.ManyToManyField('NaturalKeyThing', related_name='thing_m2m_set') -- cgit v1.3