Fix post-migrate hooks - #8060
Conversation
Post migrate hooks are called after every migration. So they must be resilient against missing or differently looking models. Either they take the models from the passed apps and suppress LookupError or they should suppress both LookupError and ProgrammingError.
Backport to 3.117: 💚 backport PR created✅ Backport PR branch: Backported as #8062 🤖 @patchback |
Backport to 3.105: 💚 backport PR created✅ Backport PR branch: Backported as #8063 🤖 @patchback |
Backport to 3.85: 💚 backport PR created✅ Backport PR branch: Backported as #8064 🤖 @patchback |
Backport to 3.73: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply bed13b0 on top of patchback/backports/3.73/bed13b0be7be8421e345338795f5506f8693a736/pr-8060 Backporting merged PR #8060 into main
🤖 @patchback |
Post migrate hooks are called after every migration. So they must be resilient against missing or differently looking models. Either they take the models from the passed apps and suppress LookupError or they should suppress both LookupError and ProgrammingError.
📜 Checklist
See: Pull Request Walkthrough