Skip to content

Conversation

@csenger
Copy link
Contributor

@csenger csenger commented Mar 12, 2018

This fixed #187

@coveralls
Copy link

coveralls commented Mar 12, 2018

Coverage Status

Coverage increased (+0.004%) to 96.526% when pulling 9087c1d on dx-null-value-support into ada28b9 on master.

@tisto tisto requested a review from lukasgraf March 12, 2018 20:09
@tisto tisto self-requested a review March 13, 2018 13:53
Copy link
Member

@tisto tisto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I would like @lukasgraf to have a second look though if possible.

Copy link
Member

@lukasgraf lukasgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two minor comments, otherwise looks good to me. 👍

I pretty much had to make my peace with the fact that handling of default values and missing values is somewhat broken in Plone itself, and there's only so much we can do about that in plone.restapi.

Resetting the field to missing_value and documenting it as such feels like the least bad thing to do, and is what would meet people's expectations the most I would think.

),
'Setting it to null is not allowed.'
),
'error': None})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, 'error': None feels a bit clunky. I don't have a clear suggestion in mind though.

PATCH allows to provide just a subset of the resource
(the values you actually want to change).

If you send the value `null` for a field, the field's content will be
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In reStructuredText these need to be double backticks (``) for code literals, single backticks are just emphasis 😉

@tisto tisto merged commit 08fa498 into master Mar 13, 2018
@tisto tisto deleted the dx-null-value-support branch March 13, 2018 19:56
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.

Null value representation. WAS: How to clear a datetime field with json?

5 participants