Skip to content

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

Merged
merged 10 commits into from
Jan 16, 2018
Merged

Polymorphic list fixes #402

merged 10 commits into from
Jan 16, 2018

Conversation

adsized
Copy link
Contributor

@adsized adsized commented Jan 16, 2018

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.

robertobarreda and others added 8 commits January 16, 2018 13:24
Render polymorphic list of items with different fields
fix get_polymorphic_serializer_for_instance only for PolymorphicModelSerializer
@codecov-io
Copy link

codecov-io commented Jan 16, 2018

Codecov Report

Merging #402 into master will decrease coverage by 0.12%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
rest_framework_json_api/renderers.py 85.81% <87.5%> (-0.06%) ⬇️
rest_framework_json_api/utils.py 90.71% <0%> (-0.85%) ⬇️
rest_framework_json_api/serializers.py 80% <0%> (-0.63%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d200f2...2b91aa1. Read the comment docs.

Copy link
Collaborator

@mblayman mblayman left a 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.


fields = utils.get_serializer_fields(resource_serializer_class)
force_type_resolution = getattr(
resource_serializer_class, '_poly_force_type_resolution',
Copy link
Collaborator

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?

@adsized
Copy link
Contributor Author

adsized commented Jan 16, 2018

Fixed those couple of issues. Hopefully everything is good now 😄

Copy link
Collaborator

@mblayman mblayman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rockin'. Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants