Skip to content

Don't output key for write only relations #421

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

Closed

Conversation

peakwinter
Copy link

If the write_only key is True on a relationship, its key is still included in the response body with an empty resource object ({'data': null}).

This was fixed in #230 for normal fields but not for relations.

@codecov-io
Copy link

codecov-io commented Apr 17, 2018

Codecov Report

Merging #421 into master will decrease coverage by 0.02%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #421      +/-   ##
==========================================
- Coverage    93.1%   93.07%   -0.03%     
==========================================
  Files          54       54              
  Lines        3000     3002       +2     
==========================================
+ Hits         2793     2794       +1     
- Misses        207      208       +1
Impacted Files Coverage Δ
rest_framework_json_api/renderers.py 85.76% <50%> (-0.24%) ⬇️

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 3bfff93...5dd8106. Read the comment docs.

@sliverc sliverc self-requested a review May 1, 2018 08:38
@sliverc
Copy link
Member

sliverc commented May 1, 2018

Thanks for your contribution. Looks good to me but could you write a test case for this? Thanks.

@winged winged mentioned this pull request Nov 28, 2018
5 tasks
@sliverc
Copy link
Member

sliverc commented Nov 29, 2018

Closing this PR in favor of #522

@sliverc sliverc closed this Nov 29, 2018
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.

3 participants