Enforced uniqueness of natural keys used in tests.

This commit is contained in:
Mariusz Felisiak 2020-04-07 10:54:19 +02:00 committed by GitHub
parent 678f958ef9
commit cf21fc9bf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 13 deletions

View file

@ -25,7 +25,7 @@ class PersonManager(models.Manager):
class Person(models.Model):
name = models.CharField(max_length=100)
name = models.CharField(max_length=100, unique=True)
objects = PersonManager()