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
When using plone.api.content.create together with Dexterity types which have behaviors with custom behavior factory classes (e.g. with the behavior attribute test123 which sets a marker interface in the behavior factory class instead of an attribute), then content creation leads to unexpected results.
E.g. plone.api.content.create(container, "TestType", "testid", "testtile", test123=True) sets an attribute on the content object instead of a marker interface.
This could be solved when using plone.dexterity.utils.createContentInContainer.
I've also been surprised by this. On the other hand, I've also written code that depends on the way it works currently. So it's a hard question what to do about backwards compatibility.
When using
plone.api.content.create
together with Dexterity types which have behaviors with custom behavior factory classes (e.g. with the behavior attributetest123
which sets a marker interface in the behavior factory class instead of an attribute), then content creation leads to unexpected results.E.g.
plone.api.content.create(container, "TestType", "testid", "testtile", test123=True)
sets an attribute on the content object instead of a marker interface.This could be solved when using
plone.dexterity.utils.createContentInContainer
.Related:
The text was updated successfully, but these errors were encountered: