Commit e9386222 authored by Romain Courteaud's avatar Romain Courteaud

Do not redirect after document contribution, as it leads to conflict errors.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18921 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 13c8886e
...@@ -102,6 +102,7 @@ try:\n ...@@ -102,6 +102,7 @@ try:\n
new_content = context.portal_contributions.newContent(**kw)\n new_content = context.portal_contributions.newContent(**kw)\n
new_content.processFile()\n new_content.processFile()\n
merged_content = new_content.Document_convertToBaseFormatAndDiscoverMetadata(file_name=file_name)\n merged_content = new_content.Document_convertToBaseFormatAndDiscoverMetadata(file_name=file_name)\n
\n
except ConversionError, Fault:\n except ConversionError, Fault:\n
# there are errors during ingestion content\n # there are errors during ingestion content\n
failure = 1\n failure = 1\n
...@@ -136,9 +137,16 @@ else:\n ...@@ -136,9 +137,16 @@ else:\n
msg = context.Base_translateString(\'Document successfully created\')\n msg = context.Base_translateString(\'Document successfully created\')\n
target = new_content\n target = new_content\n
\n \n
return target.Base_redirect(\'view\',\n # Change acquisition context of document, in order to get web section layout\n
keep_items=dict(portal_status_message=msg, \n target = context.restrictedTraverse(target.getRelativeUrl())\n
editable_mode=editable_mode))\n target.REQUEST.set(\'editable_mode\', editable_mode)\n
target.REQUEST.set(\'portal_status_message\', msg)\n
return target.view()\n
\n
# XXX Do not use redirect, as it leeds to conflict error with convertion process\n
# return target.Base_redirect(\'view\',\n
# keep_items=dict(portal_status_message=msg, \n
# editable_mode=editable_mode))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
619 620
\ No newline at end of file \ 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