Commit 2b20bda2 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_dms: update metadata if convertion is on going

parent 2a072475
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
<value> <string>from ZODB.POSException import ConflictError\n <value> <string>from ZODB.POSException import ConflictError\n
from Products.ERP5.Document.Document import ConversionError\n from Products.ERP5.Document.Document import ConversionError\n
from Products.ERP5Type.Log import log\n from Products.ERP5Type.Log import log\n
\n if context.getExternalProcessingState() == \'converted\':\n
return \n
message = None\n message = None\n
try:\n try:\n
return context.updateBaseMetadata(**kw)\n return context.updateBaseMetadata(**kw)\n
...@@ -74,7 +75,7 @@ isTransitionPossible = context.getPortalObject().portal_workflow.isTransitionPos ...@@ -74,7 +75,7 @@ isTransitionPossible = context.getPortalObject().portal_workflow.isTransitionPos
if isTransitionPossible(context, \'conversion_failed\'):\n if isTransitionPossible(context, \'conversion_failed\'):\n
# mark document as conversion failed if not already done by convertToBaseFormat\n # mark document as conversion failed if not already done by convertToBaseFormat\n
context.conversionFailed(comment=message)\n context.conversionFailed(comment=message)\n
else:\n elif context.getExternalProcessingState() not in (\'converted\', \'empty\'):\n
# just save problem message in workflow history\n # just save problem message in workflow history\n
context.processConversionFailed(comment=message)\n context.processConversionFailed(comment=message)\n
log(\'%s %s\' %(context.getRelativeUrl(), message))\n log(\'%s %s\' %(context.getRelativeUrl(), message))\n
......
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