From bcd2e6c697ee29ab1c1240a6b30281d53329b333 Mon Sep 17 00:00:00 2001 From: Uriel Corfa Date: Sat, 21 Jun 2014 19:37:39 -0700 Subject: [PATCH] Removed 'to_field' from ForeignKey(settings.AUTH_USER_MODEL) in admin's initial migration. This enables using a custom user model with a primary key with a name different than 'id'; refs #22889. --- django/contrib/admin/migrations/0001_initial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admin/migrations/0001_initial.py b/django/contrib/admin/migrations/0001_initial.py index e7b3ebecc5..8d46ab1572 100644 --- a/django/contrib/admin/migrations/0001_initial.py +++ b/django/contrib/admin/migrations/0001_initial.py @@ -23,7 +23,7 @@ class Migration(migrations.Migration): ('action_flag', models.PositiveSmallIntegerField(verbose_name='action flag')), ('change_message', models.TextField(verbose_name='change message', blank=True)), ('content_type', models.ForeignKey(to_field='id', blank=True, to='contenttypes.ContentType', null=True)), - ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, to_field='id')), + ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ('-action_time',),