-
Notifications
You must be signed in to change notification settings - Fork 463
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
Update manager to support custom parent name #836
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.
Thanks, looks good. It would be great if you could add or extend a test to avoid regressions in the future?
I will look into that in the coming days |
@matmair I was about to submit a PR with your exact changes when I saw this. Happy to lend a hand if you need |
@harrisonbarlow if you have suggestions how this can be tested in a pythonic way I would be very open to that. All solutions I came up with till now are pretty huge and unwildy |
Hi @matmair My idea was to create a new model with a custom parent_attr
I first noticed this issue when trying to rebuild the tree with a custom parent_attr. So this may provide the coverage we need
What do you think? |
@harrisonbarlow The test looks good to me, something like this is certainly sufficient to avoid regressions. |
Thank you for the suggestion @harrisonbarlow, I added them |
Thanks @matmair ! @matthiask if you're happy with these changes and the tests are passing, what's the chance of getting a patch release with them? |
High, I have just pushed 0.16 to PyPI. Thanks to you all! |
Currently a harcoded 'parent' attribute is used for the lookup. If you use the Meta attribute parent_attr (our code base uses this for legacy schema reasons) this breaks.