Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Post endpoint - remove empty/null values from the return data.#2393

Closed
adamsilverstein wants to merge 3 commits intodevelopfrom
fixes/dont-return-null-or-blank-values
Closed

Post endpoint - remove empty/null values from the return data.#2393
adamsilverstein wants to merge 3 commits intodevelopfrom
fixes/dont-return-null-or-blank-values

Conversation

@adamsilverstein
Copy link
Copy Markdown

Fixes an issues with the JS CLient that prevented saving a created post. Receiving and then sending the null/empty values back to the server fails a validation test, and the save fails. This change strips empty values from the return.

Fixes an issues with the JS CLient that prevents saving a created post because sending the null/empty valuesback to the server fails a validation test.
@adamsilverstein
Copy link
Copy Markdown
Author

For more details about the reasoning behind this PR, see #2303.

@danielbachhuber
Copy link
Copy Markdown
Member

I don't think we should be stripping data from the response.

What if we set any date field to null if it equals 0000 in the database, and accept a create or update request with a null date to mean to set the date value to 000 in the database?

@danielbachhuber
Copy link
Copy Markdown
Member

For slugs, the problem needs to be addressed with #1585

@kadamwhite
Copy link
Copy Markdown
Contributor

Depends on resolution of #2657, there are some differences of opinion there

@kadamwhite
Copy link
Copy Markdown
Contributor

Per #2657 we should not omit values from the data returned to the client; missing data should be exposed as null. Closing this PR and opening a new issue to track making the change Daniel suggested above.

@kadamwhite kadamwhite closed this Sep 13, 2016
@kadamwhite kadamwhite deleted the fixes/dont-return-null-or-blank-values branch September 13, 2016 22:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants