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

Empty cases of .validated_data and .errors as lists not dicts for ListSerializer #4180

Merged

Conversation

tomchristie
Copy link
Member

When .is_valid fails for a ListSerializer, the .validated_data attribute should be [], not {}.
When is_valid passes for a ListSerializer, the .errors attribute should be [], not {}.

Note that users don't typically hit this, as they've already checked is_valid, so the empty case doesn't get typically get inspected.

Closes #3437.
Closes #3434.
Closes #3476.

Thanks to @nip3o, @jpadilla and @xordoquy.

@tomchristie tomchristie added the Bug label Jun 8, 2016
@tomchristie tomchristie added this to the 3.4.0 Release milestone Jun 8, 2016
@tomchristie tomchristie merged commit a5f822d into master Jun 8, 2016
@tomchristie tomchristie deleted the empty-cases-as-lists-not-dicts-for-listserializer branch June 8, 2016 14:55
@jpadilla
Copy link
Member

jpadilla commented Jun 8, 2016

@tomchristie thanks for picking this up

@tomchristie
Copy link
Member Author

No problem! Trying to get the issue list into shape as part of the funded work right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants