# HG changeset patch # User Thierry Florac # Date 1506673776 -7200 # Node ID 6a4964dad8aa9ee4cedfdf053eef579fec6f4e5a # Parent 0c23e1a6b1b65f16e3ab64f8d4d3d0e59598a5da Don't create default paragraphs if paragraphs list is not empty (which is the case when duplicating a content) diff -r 0c23e1a6b1b6 -r 6a4964dad8aa src/pyams_content/component/paragraph/__init__.py --- 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):