Commit b61705a7 authored by Nicolas Dumazet's avatar Nicolas Dumazet

* triggering on newContent is not required and actually causes issues:

  - calling the workflow when a line is added is premature, because
    the line is probably not set up correctly
  - _setResource* on the line will trigger the proper action later on
* correct typo on interaction name
* check that resource is not None



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33373 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a81191e1
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>ransformationDescendant_reindexTransformationResource</string> </value> <value> <string>TransformationDescendant_reindexTransformationResource</string> </value>
</item> </item>
<item> <item>
<key> <string>method_id</string> </key> <key> <string>method_id</string> </key>
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
<key> <string>method_id</string> </key> <key> <string>method_id</string> </key>
<value> <value>
<list> <list>
<string>newContent</string>
<string>_setVariationBaseCategory.*</string> <string>_setVariationBaseCategory.*</string>
<string>_setVersion</string> <string>_setVersion</string>
</list> </list>
...@@ -67,7 +66,7 @@ ...@@ -67,7 +66,7 @@
</item> </item>
<item> <item>
<key> <string>once_per_transaction</string> </key> <key> <string>once_per_transaction</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_filter</string> </key> <key> <string>portal_type_filter</string> </key>
......
...@@ -61,7 +61,8 @@ while transformation.getPortalType() != "Transformation":\n ...@@ -61,7 +61,8 @@ while transformation.getPortalType() != "Transformation":\n
transformation = transformation.getParentValue()\n transformation = transformation.getParentValue()\n
\n \n
resource = transformation.getResourceValue()\n resource = transformation.getResourceValue()\n
resource.reindexObject()\n if resource is not None:\n
resource.reindexObject()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -103,6 +104,7 @@ resource.reindexObject()\n ...@@ -103,6 +104,7 @@ resource.reindexObject()\n
<string>transformation</string> <string>transformation</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>resource</string> <string>resource</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -53,7 +53,11 @@ ...@@ -53,7 +53,11 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>state_change[\'object\'].getResourceValue().reindexObject()\n <value> <string>transformation = state_change[\'object\']\n
resource = transformation.getResourceValue()\n
\n
if resource is not None:\n
resource.reindexObject()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -91,8 +95,11 @@ ...@@ -91,8 +95,11 @@
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>transformation</string>
<string>_getattr_</string>
<string>resource</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
457 458
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment