Error in model migration
TypeError: isinstance() arg 2 must be a type or tuple of types
The main reason is that there are two databases A and B to be migrated, and there is a foreign key in a that points to B. then, you must migrate the database of B before adding and migrating a again