You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
looking at the request, if the "Modify exported data for migrations" is unchecked, it misses the "migration". If missing, the default is True. If checked, it is True. So it is always True!
This mean that a lot of fields will be missing (particularly the relation choice fields)/changed even if this option is not chosen.
@pbauer do you agree? Maybe this is something related on how Zope consider boolean fields?
The text was updated successfully, but these errors were encountered:
"Since zope.schema==6.1.0, all zope.schema.Bool fields must have a required=False attribute. This allows you to either tick or not tick the checkbox, submit the form, and process the field with either its value when ticked or None when unticked. Otherwise, you can't save the form without ticking the checkbox, which effectively makes the field value always True."
@yurj is right, that self.migration is always true because if you uncheck the checkbox, its missing in self.request.form and therefore defaults to True always -> simple fix: change migration=False in the __call__ to opt-in migration instead of opt-out.
This has nothing to do with the zope.schema.Bool problem, because the @@export_content view template is a hand-crafted form and not generated from a schema.
collective.exportimport/src/collective/exportimport/export_content.py
Line 113 in d6876c6
looking at the request, if the "Modify exported data for migrations" is unchecked, it misses the "migration". If missing, the default is True. If checked, it is True. So it is always True!
This mean that a lot of fields will be missing (particularly the relation choice fields)/changed even if this option is not chosen.
@pbauer do you agree? Maybe this is something related on how Zope consider boolean fields?
The text was updated successfully, but these errors were encountered: