Commit 5b2a13c7 authored by Ivan Tyagov's avatar Ivan Tyagov

Redirect to document only if it is not None. In this case fall back to redirect url.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32953 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ce86f672
...@@ -125,7 +125,7 @@ if redirect_to_document or redirect_url is not None:\n ...@@ -125,7 +125,7 @@ if redirect_to_document or redirect_url is not None:\n
# this is an UI mode where script should handle HTTP redirects and is likely used\n # this is an UI mode where script should handle HTTP redirects and is likely used\n
# by ERP5 form\n # by ERP5 form\n
message = context.Base_translateString(message)\n message = context.Base_translateString(message)\n
if redirect_to_document:\n if redirect_to_document and document is not None:\n
# explicitly requried to redirect to ingested document\n # explicitly requried to redirect to ingested document\n
return document.Base_redirect(\'view\', \n return document.Base_redirect(\'view\', \n
keep_items=dict(portal_status_message=message))\n keep_items=dict(portal_status_message=message))\n
......
71 72
\ 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