# HG changeset patch # User Thierry Florac # Date 1520869523 -3600 # Node ID 66563c8433cf25caed7ec1feec56bdde917c1ff2 # Parent cb1fadda86ff82a1b797ed737b78f48205d5e5c7 Code formatting diff -r cb1fadda86ff -r 66563c8433cf src/pyams_content/component/paragraph/zmi/container.py --- a/src/pyams_content/component/paragraph/zmi/container.py Mon Mar 12 16:14:50 2018 +0100 +++ b/src/pyams_content/component/paragraph/zmi/container.py Mon Mar 12 16:45:23 2018 +0100 @@ -95,15 +95,16 @@ @property def data_attributes(self): attributes = super(ParagraphContainerBaseTable, self).data_attributes - attributes['table'] = {'id': self.id, - 'data-ams-plugins': 'pyams_content', - 'data-ams-plugin-pyams_content-src': - get_resource_path(pyams_content), - 'data-ams-location': absolute_url(IParagraphContainer(self.context), self.request), - 'data-ams-pre-reload': 'PyAMS_content.paragraphs.preReload', - 'data-ams-post-reload': 'PyAMS_content.paragraphs.postReload', - 'data-ams-tablednd-drag-handle': 'td.sorter', - 'data-ams-tablednd-drop-target': 'set-paragraphs-order.json'} + attributes.setdefault('table', {}).update({ + 'id': self.id, + 'data-ams-plugins': 'pyams_content', + 'data-ams-plugin-pyams_content-src': get_resource_path(pyams_content), + 'data-ams-location': absolute_url(IParagraphContainer(self.context), self.request), + 'data-ams-pre-reload': 'PyAMS_content.paragraphs.preReload', + 'data-ams-post-reload': 'PyAMS_content.paragraphs.postReload', + 'data-ams-tablednd-drag-handle': 'td.sorter', + 'data-ams-tablednd-drop-target': 'set-paragraphs-order.json' + }) return attributes