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

Fixed #20088 -- Changed get_admin_log not to depend on User id field

Before this change, the get_admin_log method would expect User model's
FK to be named `id`. When changing that FK name, admin/index.html
rendering would fail.

This includes:
 * Changed the use of id for the use of pk property.
 * Added a regression test that fails without the patch.

This commit refs #20088.
This commit is contained in:
Juan Catalano
2013-03-19 19:17:31 -03:00
parent 1fe90b281b
commit 054ce2aa02
3 changed files with 25 additions and 3 deletions

View File

@@ -87,3 +87,6 @@ class OrderedObject(models.Model):
number = models.IntegerField(default=0, db_column='number_val')
objects = OrderedObjectManager()
class CustomIdUser(models.Model):
uuid = models.AutoField(primary_key=True)