Commit da5aa5ab authored by Łukasz Nowak's avatar Łukasz Nowak

- use new workflow API method isTransitionPossible instead of blindly trying...

 - use new workflow API method isTransitionPossible instead of blindly trying to invoke every transition


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29503 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b3a8ab0e
...@@ -55,10 +55,14 @@ ...@@ -55,10 +55,14 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>object = state_change[\'object\']\n <value> <string>object = state_change[\'object\']\n
\n \n
# Try all expire methods\n if context.isTransitionPossible(object, \'expire\'):\n
object.expire()\n object.expire()\n
object.expireProtected()\n \n
object.expirePublished()\n if context.isTransitionPossible(object, \'expire_protected\'):\n
object.expireProtected()\n
\n
if context.isTransitionPossible(object, \'expire_published\'):\n
object.expirePublished()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -99,6 +103,7 @@ object.expirePublished()\n ...@@ -99,6 +103,7 @@ object.expirePublished()\n
<string>_getitem_</string> <string>_getitem_</string>
<string>object</string> <string>object</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
858 859
\ 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