Skip to content

Commit

Permalink
[1.7.x] Removed 'to_field' from ForeignKey(settings.AUTH_USER_MODEL) …
Browse files Browse the repository at this point in the history
…in admin's initial migration.

This enables using a custom user model with a primary key with a name
different than 'id'; refs #22889.

Backport of bcd2e6c from master
  • Loading branch information
korfuri authored and timgraham committed Jun 23, 2014
1 parent 21c9591 commit 68b89f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/contrib/admin/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',),
Expand Down

0 comments on commit 68b89f4

Please sign in to comment.