forked from encode/django-rest-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return Empty when getting listserializers from empty html input
If a non-required nested list serializer is *not* included in postdata from an HTML form, the field validation nonetheless returns an empty list. This means you can easily clobber existing data when PUTting to an existing resource, just by not including some list fields. This is made worse by DRF treating skipping request parsing for empty input. - encode#3647 and encode#4566 are "fixed" but do not appear to fix the problem; empty JSON posts still skip request parsing, and list fields not included in the post still get set to empty lists.
- Loading branch information
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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