Fixed #15321 -- Honored ancestors unique checks.

Thanks to Tim for the review.
This commit is contained in:
Aron Podrigal 2015-01-21 22:15:59 -05:00 committed by Simon Charette
parent 1fc458b5a3
commit 79f27f2b61
3 changed files with 55 additions and 4 deletions

View file

@ -186,3 +186,24 @@ class Base(models.Model):
class SubBase(Base):
sub_id = models.IntegerField(primary_key=True)
class GrandParent(models.Model):
first_name = models.CharField(max_length=80)
last_name = models.CharField(max_length=80)
email = models.EmailField(unique=True)
class Meta:
unique_together = ('first_name', 'last_name')
class Parent(GrandParent):
pass
class Child(Parent):
pass
class GrandChild(Child):
pass