Commit 73b29ecc authored by Ivan Tyagov's avatar Ivan Tyagov

We do need check if "data" methods exists on pretending to be Document portal types.

Ideally need a way to do this by introspection (WIP).
parent 6f78b3bc
......@@ -62,8 +62,10 @@ if address not in MARKER and port not in MARKER:\n
for index_uid in range(len(uid)):\n
document_relative_url = getRelativeUrl[index_uid]\n
document = portal.restrictedTraverse(document_relative_url)\n
if (document.getData() not in MARKER or document.getBaseData() not in MARKER):\n
#context.log("preconvert %s" %document.getRelativeUrl())\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
if ((getattr(document, "getData", None) is not None and document.getData() not in MARKER) or \\\n
(getattr(document, "getBaseData", None) is not None and document.getBaseData() not in MARKER)):\n
document.activate(serialize_tag="conversion").Base_callPreConvert()\n
</string> </value>
</item>
......
7
\ No newline at end of file
8
\ 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