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

Fix PATCH on @user properties if the portrait is empty, returns 400 #752

Merged
merged 2 commits into from
Apr 1, 2020

Conversation

sneridagh
Copy link
Member

No description provided.

@mister-roboto
Copy link

@sneridagh thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

@sneridagh sneridagh requested a review from tisto June 15, 2019 14:49
@sneridagh
Copy link
Member Author

@jenkins-plone-org please run jobs

@buchi
Copy link
Member

buchi commented Jun 24, 2019

@sneridagh I've tested this on Plone 5.2, 5.1 and 4.3 and for me it seems to work.
Not sure what exactly your issue was.

A user portrait can be deleted by providing null:

{
    "portrait": null
}

To keep the current portrait, omit portrait in the request.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 96.262% when pulling f5f97d5 on fixuserportraitisempty into d6597a5 on master.

@tisto
Copy link
Member

tisto commented Jun 30, 2019

@buchi @sneridagh this kind of raises the general question of how we set null values in plone.restapi. I guess we have to check how we do this on other endpoints and then document that properly for the future.

@tisto tisto merged commit b315558 into master Apr 1, 2020
@tisto tisto deleted the fixuserportraitisempty branch April 1, 2020 09:56
tisto pushed a commit that referenced this pull request Apr 1, 2020
…752)

* Fix deleting user portrait

* Fix image type in user portrait tests

Co-authored-by: Thomas Buchberger <t.buchberger@4teamwork.ch>
sneridagh added a commit that referenced this pull request Apr 17, 2020
* master: (133 commits)
  Fix coveralls (#910)
  Refs #905 - Fix sphinxbuilder with Python 3.8 (#906)
  Remove #900 changelog. Released with 6.6.0.
  Back to development: 6.6.1
  Preparing release 6.6.0
  Add next and previous feature (#901)
  Add next and previous feature (#901)
  Force p.restapi checkout for Plone 5.2
  Add performance tests for Plone 5.2.1.
  Make sure we use the latest p.restapi in performance tests. Remove unused plonesite recipe params.
  #896/897 has been released with p.restapi 6.5.1/6.5.2.
  Back to development: 6.5.3
  Preparing release 6.5.2
  Fix for the use case while updating user properties in the @user endpoint, and the portrait is already previously set but the request includes the (previously) serialized value as a string because the user are not updating it (#897)
  Fix for the use case while updating user properties in the @user endpoint, and the portrait is already previously set but the request includes the (previously) serialized value as a string because the user are not updating it (#897)
  Remove news/751.bugfix since it already has been released with 6.5.1.
  Back to development: 6.5.2
  Preparing release 6.5.1
  Fix PATCH on @user properties if the portrait is empty, returns 400 (#752)
  Fix PATCH on @user properties if the portrait is empty, returns 400 (#752)
  ...
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.

5 participants