diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-04-07 10:54:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-07 10:54:19 +0200 |
| commit | cf21fc9bf010c71385dbead215d26151fb70d2ad (patch) | |
| tree | d617985fb81e569ff6d654be50bb54a1c522cbab /tests/serializers | |
| parent | 678f958ef972bf9be402332537149ca0884035ba (diff) | |
Enforced uniqueness of natural keys used in tests.
Diffstat (limited to 'tests/serializers')
| -rw-r--r-- | tests/serializers/models/natural.py | 2 |
1 files changed, 1 insertions, 1 deletions
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') |
