plone.api.content.create doesn't adapt behaviors
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 101
- Forks
- 62
- Avg merge
- 15h 15m
- Merged PRs (30d)
- 1
Description
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.
Related:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the plone.api.content.create entry point and compare its behavior handling with plone.dexterity.utils.createContentInContainer. Reproduce the test123 example using a custom behavior factory, then verify that content creation applies the marker interface rather than setting an attribute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100