plone / plone.supermodel

Provides XML import and export for schema interfaces based on zope.schema fields
5 stars 8 forks source link

Unset _init_field flag on init completion. #12

Closed metatoaster closed 8 years ago

metatoaster commented 8 years ago

On completion of the construction of a given field_instance, the _init_field was not properly unset at all as it was reassigned with the same value of True. This breaks validation, such as validation for a given List with value_type of Choice against some vocabulary, for example, schemas defined in registry.xml will not properly undergo validation.

The tests added in fields.txt follows the same format as the rest of the fields, it may be excessive but it follows the format against all the fields defined.

jensens commented 8 years ago

@metatoaster before we can accept your contribution you need to sign the contributor agreement. for more information see https://plone.org/foundation/contributors-agreement

jensens commented 8 years ago

@metatoaster if you rebase we can merge this one

metatoaster commented 8 years ago

Rebase done.

gforcada commented 8 years ago

@metatoaster before merging we need to make sure that all tests pass, you can check that yourself with jenkins.plone.org see http://jenkinsploneorg.readthedocs.io/en/latest/run-pull-request-jobs.html as master branch of plone.supermodel is being used by Plone 4.3, 5.0 and 5.1 I already started the 3 jobs myself, next time you can do that yourself if you want to :-)

metatoaster commented 8 years ago

@gforcada Oh thanks. I was wondering why the CI wasn't triggered.

jensens commented 8 years ago

Tests for 4.3 and 5.0 are failing, but they are both on its on branch 1.2.x, so merging for 5.1 is fine.