-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Attempt to address Django 2.0 deprecate warnings related to field.rel #3906
Conversation
Thanks for the PR. Unfortunately this breaks Django < 1.9 compatibility. |
@xordoquy thanks for the feedback, I added a compatibility function and the tests are now passing. |
# If model is a child via multi-table inheritance, use parent's pk. | ||
pk = pk.rel.to._meta.pk | ||
pk = get_remote_field(pk).to._meta.pk |
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.
Could we instead have this set in a var after line 83? remote_field = get_remote_field(pk)
and use throughout?
… want to see what Travis says
Looks like this just needs bringing up to date with master. |
Thanks for raising this @jplock. Now resolved! |
Thanks for fixing this. Once I tried to implement @jpadilla's suggestion, I got stuck and distracted. |
S'all good. We got there in the end! |
This is related to django/django#4241
I'm not sure how best to handle this for versions prior to Django 1.9