Commit 7b887cdb authored by Bartek Górny's avatar Bartek Górny

changed ingestion process - a doc should be converted after it was processed...

changed ingestion process - a doc should be converted after it was processed (or ingested) no matter where it came from

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10412 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a4345821
No related merge requests found
......@@ -81,6 +81,11 @@ if fname is not None:\n
context.guessMimeType(fname)\n
if not context.getTitle():\n
context.setTitle(fname)\n
# use duck typing to check if it is OOo\n
if hasattr(context,\'convert\') and hasattr(context,\'hasFile\') and hasattr(context,\'hasOOfile\'):\n
context.reset()\n
if context.hasFile() and not context.hasOOfile():\n
context.activate( activity = \'SQLQueue\').OOoDocument_convertAfter()\n
</string> </value>
</item>
<item>
......@@ -128,6 +133,7 @@ if fname is not None:\n
<string>None</string>
<string>_getattr_</string>
<string>context</string>
<string>hasattr</string>
</tuple>
</value>
</item>
......
......@@ -68,11 +68,8 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>ob=state_change.object\n
ob.log(ob.getRelativeUrl())\n
ob.log(ob.hasFile())\n
ob.log(ob.hasOOfile())\n
if ob.hasFile() and not ob.hasOOfile():\n
<value> <string>ob=context\n
if ob.hasFile() and not ob.hasOOfile(): #doublecheck\n
try:\n
res=ob.convert()\n
ob.log(res)\n
......@@ -95,9 +92,15 @@ if ob.hasFile() and not ob.hasOOfile():\n
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
<value> <string>*a,**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -117,15 +120,17 @@ if ob.hasFile() and not ob.hasOOfile():\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>state_change</string>
<string>_getattr_</string>
<string>a</string>
<string>kw</string>
<string>context</string>
<string>ob</string>
<string>_getattr_</string>
<string>res</string>
<string>str</string>
<string>_getitem_</string>
......@@ -147,7 +152,7 @@ if ob.hasFile() and not ob.hasOOfile():\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Convert_after</string> </value>
<value> <string>OOoDocument_convertAfter</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
208
\ No newline at end of file
212
\ 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