Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Copy link

@peakwinter peakwinter commented Apr 17, 2018

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.

Copy link

codecov-io commented Apr 17, 2018
edited
Loading

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
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.

Copy link
Member

sliverc commented Nov 29, 2018

Closing this PR in favor of #522

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@sliverc sliverc Awaiting requested review from sliverc

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /