Monkey-patch modelcluster bug and take fix for related actions back into use#420
Merged
Monkey-patch modelcluster bug and take fix for related actions back into use#420
Conversation
This should be removed once this pull request is merged to modelcluster: wagtail/django-modelcluster#203
…d actions" This reverts commit a6722ca.
Contributor
|
It occured to me though that especially with monkey patches, maybe a regression test would be nice. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We recently changed
related_actionsof theActionmodel to aParentalManyToManyFieldin order to fix the bug that related actions were not saved. While this fixed the bug, it made the action list in the frontend behave in an odd way. (The actions were no longer grouped by categories.) Closer investigation showed that this is due to a bug in django-modelcluster. I made a PR: wagtail/django-modelcluster#203Until that PR to modelcluster is merged and taken into use, we can use the monkey-patch proposed by the current PR.
Related issue
https://app.asana.com/1/1201243246741462/project/1206017643443542/task/1211588710979857?focus=true
Testing
A unit test has been included in my PR to modelcluster.