Skip to content

2.0.0: Client Secret Hasher Migration vs. Swapped Application Models #1146

Closed
@josephabrahams

Description

@josephabrahams

Describe the bug

The forward migration introduced in #1093 to hash all previously saved client secrets runs on apps that use a custom application model and produces the following error:

AttributeError: Manager isn't available; 'oauth2_provider.Application' has been swapped for 'oauth.Application'

To Reproduce

Define a custom application model in settings.py:

OAUTH2_PROVIDER_APPLICATION_MODEL = "oauth.Application"

Migrate the database:

$ python manage.py migrate

Expected behavior

Migrations run when using a swappable application model without throwing an error.

Version 2.0

  • I have tested with the latest published release and it's still a problem.
  • I have tested with the master branch and it's still a problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions