-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Fix validation for ListSerializer #8979
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
auvipy
merged 20 commits into
encode:master
from
saadullahaleem:fix/list_serializer_validation
May 29, 2023
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a717d74
fix: Make the instance variable of child serializer point to the corr…
saadullahaleem 4bbc689
fix formatting issues for list serializer validation fix
saadullahaleem 516ba52
fix imports sorting for list serializer tests
saadullahaleem b9c8d19
remove django 2.2 from docs index (#8982)
deronnax e6655e3
Declared Django 4.2 support in README.md (#8985)
MehrazRumman 01b99dd
Fix Links in Documentation to Django `reverse` and `reverse_lazy` (#8…
theomega 8d7e250
fix URLPathVersioning reverse fallback (#7247)
jornvanwier b9b50bd
Make set_value a method within `Serializer` (#8001)
tienne-B 869d46f
fix: Make the instance variable of child serializer point to the corr…
saadullahaleem f969143
Make set_value a method within `Serializer` (#8001)
tienne-B a1f03d5
fix: Make the instance variable of child serializer point to the corr…
saadullahaleem 9ac6417
fix: Make the instance variable of child serializer point to the corr…
saadullahaleem 76110bf
fix formatting issues for list serializer validation fix
saadullahaleem c1ee7e7
fix: Make the instance variable of child serializer point to the corr…
saadullahaleem 74cb500
fix formatting issues for list serializer validation fix
saadullahaleem 9577880
Merge branch 'master' into fix/list_serializer_validation
saadullahaleem 7197a86
fix linting
saadullahaleem bb4102a
Update rest_framework/serializers.py
auvipy 0dc6201
Update rest_framework/serializers.py
saadullahaleem d747449
fix: instance variable in list serializer, remove commented code
saadullahaleem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lengths might be different in some use cases. Let's say we want the list serializer to delete from queryset all elements that are not provided in the data during an update. The queryset will be bigger than the data in this case.
This update breaks serializers like:
Instead of indexing, it's better to relate the elements by id:
We could add a "pk_field" to the serializer Meta to make it more flexible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you mind come with an improvement in another PR and ping me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@auvipy sure! #9244