Code formatting
authorThierry Florac <thierry.florac@onf.fr>
Mon, 12 Mar 2018 16:45:23 +0100
changeset 469 66563c8433cf
parent 468 cb1fadda86ff
child 470 2b552177c142
Code formatting
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