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

export and import constrains #71

Merged
merged 4 commits into from
Dec 8, 2021
Merged

export and import constrains #71

merged 4 commits into from
Dec 8, 2021

Conversation

pbauer
Copy link
Member

@pbauer pbauer commented Nov 30, 2021

Fixes #65

Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

Tested with export and import on Plone 4.3, and it works. Thanks! At first I thought we would miss the constrainTypesMode field itself, but this is automatically contained in the schema.

One minor inline comment, but is also fine to merge as is.

src/collective/exportimport/export_content.py Outdated Show resolved Hide resolved
@pbauer
Copy link
Member Author

pbauer commented Dec 6, 2021

Thanks for the review. I now already had a case where the constrains didi not allow importing the exported data, e.g. because a folder or a collection was added and then later disallowed.
How about adding content disregarding the constraints e.g. using plone.dexterity.utils.createContentInContainer or Products.CMFCore.TypesTool._constructInstance?

@mauritsvanrees
Copy link
Member

Ah. Yes, that seems good.

@pbauer pbauer merged commit 0bd90cf into main Dec 8, 2021
@pbauer pbauer deleted the constrains branch December 8, 2021 10:16
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.

Handle constraints during export/import of content
2 participants