Commit 143b3b40 authored by Tristan Cavelier's avatar Tristan Cavelier

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

parent 46a99372
...@@ -62,6 +62,10 @@ allowed_portal_type_list = portal.getPortalDocumentTypeList() + portal.getPortal ...@@ -62,6 +62,10 @@ allowed_portal_type_list = portal.getPortalDocumentTypeList() + portal.getPortal
if portal_type not in allowed_portal_type_list:\n if portal_type not in allowed_portal_type_list:\n
return False\n return False\n
\n \n
# XXX hardcoded validation states blacklist. Do State Types?\n
if context.getValidationState() in ["draft", "deleted", "cancelled", "archived"]:\n
return False\n
\n
# XXX: we do check if "data" methods exists on pretending to be Document portal types\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 # 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 return (getattr(context, "getData", None) is not None and context.getData() not in MARKER) or \\\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