1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #17615 -- Corrected unique field validation when using multitable inheritance. The validation used wrong pk value if the parent and child model had different pk fields. Thanks ungenio for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Anssi Kääriäinen
2012-04-20 17:34:29 +00:00
parent 3d5d0be499
commit 53fb45c6d8
3 changed files with 30 additions and 4 deletions

View File

@@ -163,3 +163,10 @@ class BusStation(Station):
class TrainStation(Station):
zone = models.IntegerField()
class User(models.Model):
username = models.CharField(max_length=30, unique=True)
class Profile(User):
profile_id = models.AutoField(primary_key=True)
extra = models.CharField(max_length=30, blank=True)