Movatterモバイル変換


[0]ホーム

URL:


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

Ensured that sparse fields only applies when rendering not when parsing#1221

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
n2ygk merged 4 commits intodjango-json-api:mainfromsliverc:create_sparse_fields
May 1, 2024

Conversation

sliverc
Copy link
Member

@slivercsliverc commentedApr 19, 2024
edited
Loading

Fixes#1216
Fixes#332

Description of the Change

The rendering of objects is flawed as the DJA renderer does most of the serialization again which should actually only be done by the serializer. Even though I reduced the readable fields in the serializer when sparse fields is used, it did not work.

I already adjustedextract_attributes that it uses the fields provided by the serializer. To adjustextract_relationships is more complex. Therefore, to get this critical issue fixed I also added code to exclude fields in the renderer when sparse fields is used.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name inAUTHORS

@slivercsliverc marked this pull request as ready for reviewApril 30, 2024 19:42
@slivercsliverc requested a review fromn2ygkApril 30, 2024 19:42
@sliverc
Copy link
MemberAuthor

Codecov does not pass as it highlights two lines which I did change in this pull request but only changing the import not the functionality. There was no test for these lines before. I would say we ignore it, but I am open to revert the change to clean up the utils import in the renderer.

n2ygk reacted with thumbs up emoji

@n2ygkn2ygk merged commit6c609f8 intodjango-json-api:mainMay 1, 2024
@slivercsliverc deleted the create_sparse_fields branchMay 2, 2024 04:32
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@n2ygkn2ygkn2ygk approved these changes

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

Successfully merging this pull request may close these issues.

Sparse fields set should only drop fields when rendering Sparse fields nulling meta fields instead of removing them
2 participants
@sliverc@n2ygk

[8]ページ先頭

©2009-2025 Movatter.jp