mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +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:
		
				
					committed by
					
						 Simon Charette
						Simon Charette
					
				
			
			
				
	
			
			
			
						parent
						
							3e24ab6f4c
						
					
				
				
					commit
					fc49e73648
				
			| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user