Skip to content
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

Sparse fields set should only drop fields when rendering #1216

Closed
1 of 2 tasks
sliverc opened this issue Apr 11, 2024 · 0 comments · Fixed by #1221
Closed
1 of 2 tasks

Sparse fields set should only drop fields when rendering #1216

sliverc opened this issue Apr 11, 2024 · 0 comments · Fixed by #1221
Labels
bug good first issue Good for newcomers

Comments

@sliverc
Copy link
Member

sliverc commented Apr 11, 2024

Description of the Bug Report

As discussed in #1214 there is an issue with SparseFieldsetsMixin serializer mixin. It drops fields when reading and writing, however it should only do it when reading and not when writing as per specification.

When analyzing the code, it seems the best to implement is to move the exclude logic from __init__ and overwrite _readable_fields.

Related to #1053

Checklist

  • Certain that this is a bug (if unsure or you have a question use discussions instead)
  • Code snippet or unit test added to reproduce bug
@sliverc sliverc added bug good first issue Good for newcomers labels Apr 11, 2024
@sliverc sliverc changed the title Sparse fields set should only drop fields when reading Sparse fields set should only drop fields when rendering Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers
Projects
None yet
1 participant