src/pyams_content/shared/common/zmi/workflow.py
changeset 451 8467cbd639b5
parent 328 3ae323f42a24
child 527 5dd1aa8bedd9
--- a/src/pyams_content/shared/common/zmi/workflow.py	Wed Mar 07 14:46:15 2018 +0100
+++ b/src/pyams_content/shared/common/zmi/workflow.py	Wed Mar 07 16:18:21 2018 +0100
@@ -154,6 +154,7 @@
             self.widgets['displayed_publication_date'].value = pub_info.displayed_publication_date
 
     def createAndAdd(self, data):
+        data = data.get(self, data)
         pub_info = IWorkflowPublicationInfo(self.context)
         pub_info.publication_effective_date = data.get('publication_effective_date')
         pub_info.push_end_date = data.get('push_end_date')
@@ -350,6 +351,7 @@
             self.widgets['displayed_publication_date'].value = pub_info.displayed_publication_date
 
     def createAndAdd(self, data):
+        data = data.get(self, data)
         pub_info = IWorkflowPublicationInfo(self.context)
         pub_info.publication_effective_date = data.get('publication_effective_date')
         pub_info.push_end_date = data.get('push_end_date')
@@ -704,6 +706,7 @@
     ajax_handler = 'wf-clone.json'
 
     def createAndAdd(self, data):
+        data = data.get(self, data)
         info = IWorkflowInfo(self.context)
         return info.fire_transition_toward(DRAFT, comment=data.get('comment'))
 
@@ -780,6 +783,7 @@
                 self.actions['action'].title = _("Delete definitively")
 
     def createAndAdd(self, data):
+        data = data.get(self, data)
         state = IWorkflowState(self.context)
         if state.version_id == 1:  # remove the first and only version => remove all
             content = get_parent(self.context, ISharedContent)