1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

[1.11.x] Fixed #27967 -- Fixed KeyError in admin's inline form with inherited non-editable pk.

Thanks Robin Anupol for the initial report and workaround.

Backport of 9dc83c356d from master
This commit is contained in:
Paulo
2017-06-09 20:54:10 -04:00
committed by Tim Graham
parent 7fb148a638
commit 927d9b51fe
5 changed files with 34 additions and 6 deletions

View File

@@ -63,6 +63,10 @@ class NonAutoPKBook(models.Model):
super(NonAutoPKBook, self).save(*args, **kwargs)
class NonAutoPKBookChild(NonAutoPKBook):
pass
class EditablePKBook(models.Model):
manual_pk = models.IntegerField(primary_key=True)
author = models.ForeignKey(Author, models.CASCADE)