-
-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django Lazy Reference ValueError after upgrading to the latest version and running migrations, #1120
Comments
@smit-mehta25 I assume your comment means this is a dup of #634? |
@smit-mehta25 same problem, i update to django 4.0.2 solved. |
similar issue when I run migration: my django version is 4.0.5:
|
@phith0n Can you be specific about what versions you are using? The issue was created back several months ago and also didn't reference the version. Please fill out this template: Describe the bug To Reproduce Expected behavior Version
Additional context Also, I would ask that you repeat your reproducing test with Django 3.2 and with DOT 1.7.1 to help isolate if this is due to a change in Django or in DOT 2.x. Thanks. |
Hi @n2ygk , I think I may have found the problem. Refer to the document https://django-oauth-toolkit.readthedocs.io/en/latest/advanced_topics.html#AbstractApplication, everything is OK after I added However, the error |
I believe this dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL)
] should be changed to this to make sure all possible swappable models become dependencies: dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
migrations.swappable_dependency(settings.APPLICATION_MODEL),
migrations.swappable_dependency(settings.ACCESS_TOKEN_MODEL),
migrations.swappable_dependency(settings.ID_TOKEN_MODEL),
migrations.swappable_dependency(settings.GRANT_MODEL),
migrations.swappable_dependency(settings.REFRESH_TOKEN_MODEL),
] This has to do with auto-generated migrations ( I haven't had time to test this. Swappable models have been an ongoing point of confusion with this library forever. See also #871, #778, #634 and https://github.com/openwisp/django-swappable-models (which I don't quite understand the point of). |
I am constantly facing this issues. Is there any solutions for this one,
oauth2_provider setting configurations:
Even, I tried to apply
run_before
to my custom initial migrations. But No luck.This is with
Django==3.2.11
anddjango-oauth-toolkit==1.7.0
Below is the order of Apply migrations.
But still i am facing the above error. I have tried everything that i could from other open issues. Such as ... Swappable models. Clean migrations, run before.
The text was updated successfully, but these errors were encountered: