-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
17419 fix MPTT issue with migrations for nested module bays #17553
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure it's safe to import the model directly within a migration? IIRC, in the past we've had to jump through some hoops to avoid it.
Oh right, good point, the usual pattern is to do like |
* 17419 rebuild module bay tree on upgrade * 17419 rebuild module bay tree on upgrade * 17419 use get_model
…ommunity#17553) * 17419 rebuild module bay tree on upgrade * 17419 rebuild module bay tree on upgrade * 17419 use get_model
Fixes: #17419
Note in the migration had to use the actual model and not
apps.get_model
as the manager for rebuild is needed.