-
-
Notifications
You must be signed in to change notification settings - Fork 53
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 #99 Call processForm with empty values. #395
Conversation
From what I can see, widgets mostly do the right thing and return empty_marker if field.getName() is missing from the request. Perfect when programatically adding content through invokeFactory/api.content.create as the set values don't get modified.
Making sure BaseObject._processForm uses our values, instead of the REQUEST.form.
@david-batranu Would you be less lazy than I was and add a test ? |
@gotcha sure! if tox ever finishes fetching the 9 billion packages Plone depends on. Hopefully this decade. |
@gotcha done! Added a test in In the end I had to give up on the This took way more time than I anticipated. |
@david-batranu Thanks a lot for the test ! (I have also triggered the Jenkins build) |
src/plone/api/tests/test_content.py
Outdated
id='test-folder', | ||
title='Test folder' | ||
) | ||
assert folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just being curious: what's the point on this assertions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hvelarde thank you for your feedback! I copied the test from test_create_content
and forgot those. I'll clean them up right away.
@david-batranu I started the jobs on Plone Jenkins. Do you know how to start them ? |
@gotcha I wanted to start them but it asked for GitHub account linking, and I did not want to do that. |
@david-batranu Thanks again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
From what I can see, widgets mostly do the right thing and return empty_marker if field.getName() is missing from the request. Perfect when programatically adding content through invokeFactory/api.content.create as the set values don't get modified.