Commit 2f8f8057 authored by Łukasz Nowak's avatar Łukasz Nowak

Mark only if not marked yet.

parent 48e559d4
......@@ -55,7 +55,11 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from zExceptions import Unauthorized\n
\n
def markHistory(document, comment):\n
document.portal_workflow.doActionFor(document, action=\'edit_action\', comment=comment)\n
portal_workflow = document.portal_workflow\n
last_workflow_item = portal_workflow.getInfoFor(ob=document, \n
name=\'history\', wf_id=\'edit_workflow\')[-1]\n
if last_workflow_item[\'comment\'] != comment:\n
portal_workflow.doActionFor(document, action=\'edit_action\', comment=comment)\n
\n
def assignComputerPartition(order):\n
portal = context.getPortalObject()\n
......
......@@ -55,7 +55,11 @@ from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from zExceptions import Unauthorized\n
\n
def markHistory(document, comment):\n
document.portal_workflow.doActionFor(document, action=\'edit_action\', comment=comment)\n
portal_workflow = document.portal_workflow\n
last_workflow_item = portal_workflow.getInfoFor(ob=document, \n
name=\'history\', wf_id=\'edit_workflow\')[-1]\n
if last_workflow_item[\'comment\'] != comment:\n
portal_workflow.doActionFor(document, action=\'edit_action\', comment=comment)\n
\n
state = context.getSimulationState()\n
portal = context.getPortalObject()\n
......
829
\ No newline at end of file
830
\ 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