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 #99 Call processForm with empty values. #395

Merged
merged 6 commits into from
Mar 13, 2018

Conversation

david-batranu
Copy link
Member

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.

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.
@gotcha
Copy link
Member

gotcha commented Mar 9, 2018

@david-batranu Would you be less lazy than I was and add a test ?

@david-batranu
Copy link
Member Author

@gotcha sure! if tox ever finishes fetching the 9 billion packages Plone depends on. Hopefully this decade.

@david-batranu
Copy link
Member Author

@gotcha done! Added a test in test_content.TestPloneApiContent, hopefully that's the right place for it.

In the end I had to give up on the tox tests as they kept running buildout and re-fetching eggs on each run. I ended up running the tests on one of my existing buildouts.

This took way more time than I anticipated.

@gotcha
Copy link
Member

gotcha commented Mar 12, 2018

@david-batranu Thanks a lot for the test !
As you can see, Changelog verifier is complaining about a missing entry. Would you mind adding it ?

(I have also triggered the Jenkins build)

id='test-folder',
title='Test folder'
)
assert folder
Copy link
Member

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?

Copy link
Member Author

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.

@gotcha
Copy link
Member

gotcha commented Mar 13, 2018

@david-batranu I started the jobs on Plone Jenkins. Do you know how to start them ?

@david-batranu
Copy link
Member Author

@gotcha I wanted to start them but it asked for GitHub account linking, and I did not want to do that.

@gotcha
Copy link
Member

gotcha commented Mar 13, 2018

@david-batranu Thanks again

@gotcha gotcha merged commit 2be4760 into plone:master Mar 13, 2018
Copy link
Member

@gotcha gotcha left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet

3 participants