Commit 143b3b40 by Tristan Cavelier

disable preconversion if validation state is draft, deleted, cancelled or achived

1 parent 46a99372
......@@ -62,6 +62,10 @@ allowed_portal_type_list = portal.getPortalDocumentTypeList() + portal.getPortal
if portal_type not in allowed_portal_type_list:\n
return False\n
# XXX hardcoded validation states blacklist. Do State Types?\n
if context.getValidationState() in ["draft", "deleted", "cancelled", "archived"]:\n
return False\n
# XXX: we do check if "data" methods exists on pretending to be Document portal types\n
# we need a way to do this by introspection\n
return (getattr(context, "getData", None) is not None and context.getData() not in MARKER) or \\\n
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!