mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #15321 -- Honored ancestors unique checks.
Thanks to Tim for the review.
This commit is contained in:
parent
1fc458b5a3
commit
79f27f2b61
3 changed files with 55 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue