Auto-created migrations place custom user model *after* things that depend on it.
|Reported by:||Stephen Burrows||Owned by:||Andrew Godwin|
|Cc:||Stephen Burrows||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Ran into this when I tried to pull the latest stable/1.7.x (currently @ c8c1883962ebb0668663134e023ffbe1c753a450) and re-generate migrations for django-brambling (@ d479f0666c7fe4d5d9f11554737909dc8504ce43).
The error I'm getting is:
ValueError: Lookup failed for model referenced by field brambling.Attendee.event_person: brambling.EventPerson
The reason I'm getting this error AFAICT is that
brambling.Person is a swappable user model, and is being placed *after* things that depend on it.
I had to revert to 52b7e772e4da846efb2d75b22ec05c7105091b76 to get things working.