1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

[1.8.x] Fixed #15321 -- Honored ancestors unique checks.

Thanks to Tim for the review.

Backport of 79f27f2b61 from master
This commit is contained in:
Aron Podrigal
2015-01-21 22:15:59 -05:00
committed by Simon Charette
parent 3e24ab6f4c
commit fc49e73648
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