Don't create default paragraphs if paragraphs list is not empty (which is the case when duplicating a content)
--- a/src/pyams_content/component/paragraph/__init__.py Thu Sep 21 16:06:29 2017 +0200
+++ b/src/pyams_content/component/paragraph/__init__.py Fri Sep 29 10:29:36 2017 +0200
@@ -47,6 +47,8 @@
def handle_new_paragraphs_container(event):
"""Handle new paragraphs container"""
container = IParagraphContainer(event.object)
+ if len(container) > 0:
+ return
content = get_parent(container, IWfSharedContent)
version_state = IWorkflowState(content, None) if content is not None else None
if (version_state is None) or (version_state.version_id == 1):