Use the dexterity machinery in api.content.create#484
Conversation
|
@ale-rt thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
|
@jenkins-plone-org please run jobs |
|
@jenkins-plone-org please run jobs |
mauritsvanrees
left a comment
There was a problem hiding this comment.
So far, it looks good to me, from looking at the code.
Nice one with the context manager in the tests. :-)
Thanks for looking at it. |
| content_id = container._setObject(content.id, content) | ||
| else: | ||
| content_id = not safe_id and id or str(random.randint(0, 99999999)) | ||
| container.invokeFactory(type, content_id, **kwargs) |
There was a problem hiding this comment.
We should keep the renaming below in this case (for non-DX content), no?
|
Sorry to have dropped the ball on this, but IIRC, I gave up because I found this patch breaking the ploneintranet build. |
Fixes #439