Skip to content

Temporarily disallow constraints when creating the parent folder chain - #174

Open
ale-rt wants to merge 1 commit into
mainfrom
173-fix-constraints
Open

Temporarily disallow constraints when creating the parent folder chain#174
ale-rt wants to merge 1 commit into
mainfrom
173-fix-constraints

Conversation

@ale-rt

@ale-rt ale-rt commented Jan 26, 2023

Copy link
Copy Markdown
Member

Fixes #173

@ale-rt
ale-rt force-pushed the 173-fix-constraints branch from 3d9840e to cd0e0c7 Compare January 26, 2023 15:13

@mauritsvanrees mauritsvanrees left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you do this in a try/finally block? Should be slightly safer.

@pbauer

pbauer commented Jan 31, 2023

Copy link
Copy Markdown
Member

Or you can use Products.CMFPlone.utils._createObjectByType to bypass these checks.

@ale-rt

ale-rt commented Jan 31, 2023

Copy link
Copy Markdown
Member Author

Yeah, a context manager might be an idea.

Probably @pbauer idea is even better because it might be that even the type in not constrained it is not allowed in the FTI settings.

One other thing is that this always create a Folder.
This might be a problem if later we import the proper object.

I am working on a migration and found some other things, I will try to contribute back as soon as possible!

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.

Temporarily disallow constraints when creating content

3 participants