Skip to content

fix for #6558 default value will not be passed through validated_data #6798

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

Closed
wants to merge 2 commits into from
Closed

Conversation

samims
Copy link
Contributor

@samims samims commented Jul 12, 2019

Change docs. It was saying default date value on serializer will be passed through validated data if date field is set to read_only=True which was clearly not passing.

@carltongibson
Copy link
Collaborator

This is right. The comment was obviously missed when the behaviour was altered here. (Was it v3.8?)

Except for being explicit, not sure we need the test: it should already be covered... (?)

@carltongibson carltongibson requested a review from rpkilby July 13, 2019 14:08
@samims
Copy link
Contributor Author

samims commented Jul 29, 2019

Is there anything I need to change? Can you please let me know?

@rpkilby
Copy link
Member

rpkilby commented Jul 29, 2019

Thanks for the ping. Forgot to check in on this issue. Does this only affect date fields, or any fields with read_only+default?

@carltongibson
Copy link
Collaborator

The behaviour was changed for all field types. (The change here looks clearly right to me. I probably should have just merged it already...)

@carltongibson
Copy link
Collaborator

carltongibson commented Jul 29, 2019

Oh, except I’m not sure if we need the test of not. What do people think? (Can’t hurt I guess...)

@rpkilby
Copy link
Member

rpkilby commented Jul 29, 2019

I've created a new PR for just the docs change.

@rpkilby rpkilby closed this Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants