Skip to content

Field defines a relation with the model 'auth.User', which has been swapped out. #5

@mahdijafaridev

Description

@mahdijafaridev

I have defined a custom user model in my settings. See the settings below.

Settings:
AUTH_USER_MODEL = 'accounts.User'

And when I want to migrate, I get this error:

SystemCheckError: System check identified some issues:

ERRORS:
admin_two_factor.TwoFactorVerification.user: (fields.E301) Field defines a relation with the model 'auth.User', which has been swapped out.
	HINT: Update the relation to point at 'settings.AUTH_USER_MODEL'.

Is there any solution for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions