Changes between Initial Version and Version 1 of Ticket #33366
- Timestamp:
- Dec 14, 2021, 11:13:37 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33366 – Description
initial v1 2 2 3 3 Our model for reproduction: 4 ``` 4 5 {{{ 5 6 class RefreshToken(models.Model): 6 7 user = models.ForeignKey( 7 8 settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name="%(app_label)s_%(class)s" 8 9 ) 9 ``` 10 11 }}} 12 10 13 11 14 Users of the package are running `makemigrations` and having to see something like this (ref: https://github.com/jazzband/django-oauth-toolkit/issues/1037): 12 15 13 ``` 16 {{{ 14 17 migrations.AlterField( 15 18 model_name='refreshtoken', … … 17 20 field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s', to='auth.user'), 18 21 ), 19 ``` 22 }}} 20 23 21 24 Specifically, `to='auth.user'` is the issue. Our previous migrations properly had `to=settings.AUTH_USER_MODEL`. Please let me know how to fix this or whether this is a bug. Thanks!