-
Notifications
You must be signed in to change notification settings - Fork 301
Polymorphic list fixes #402
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
Conversation
Render polymorphic list of items with different fields
fix get_polymorphic_serializer_for_instance only for PolymorphicModelSerializer
Codecov Report
@@ Coverage Diff @@
## master #402 +/- ##
==========================================
- Coverage 91.91% 91.79% -0.13%
==========================================
Files 55 55
Lines 2882 2888 +6
==========================================
+ Hits 2649 2651 +2
- Misses 233 237 +4
Continue to review full report at Codecov.
|
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 for fixing this up. Could you add yourself and Roberto to the AUTHORS
file (alphabetically by first name)? I'd like to recognize your contributions and acknowledge that you both have some copyright in the project after this merge.
I'm happy to merge this after the couple of things have been modified.
rest_framework_json_api/renderers.py
Outdated
|
||
fields = utils.get_serializer_fields(resource_serializer_class) | ||
force_type_resolution = getattr( | ||
resource_serializer_class, '_poly_force_type_resolution', |
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.
Do you mind moving False
and the closing parenthesis all to this line?
Fixed those couple of issues. Hopefully everything is good now 😄 |
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.
Rockin'. Nice work!
As requested by @mblayman in #372, I am raising an additional pull request, including the changes from #372, to fix the remaining issues that where blocking this from being merged.
I have also rebased my branch against the master branch as I was advised that development has now moved from develop to master.