Skip to content

Migration dependency issue if extending AbstractApplication #778

@anveshagarwal

Description

@anveshagarwal

If I extend AbstractApplication from oauth2_provider to make a custom application_model say
custom.Application , then the migrations of this custom model should run prior too the oauth2_provider.migrations.0001_inital.py as this migration uses the fields from the custom models.
But after #531 merge, this dependency is removed, so while running migrations, custom Model's migrations are not running before the library's internal migration giving error like

   raise ValueError('Related model %r cannot be resolved' % self.remote_field.model)
   ValueError: Related model 'custom.Application' cannot be resolved

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions