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

If not a system preference is specified, do not raise but instead fall back to...

If not a system preference is specified, do not raise but instead fall back to default value of preferences.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32963 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5add462d
...@@ -62,11 +62,17 @@ portal_contributions = portal.portal_contributions\n ...@@ -62,11 +62,17 @@ portal_contributions = portal.portal_contributions\n
\n \n
system_preference = portal.portal_preferences.getActiveSystemPreference()\n system_preference = portal.portal_preferences.getActiveSystemPreference()\n
if synchronous_metadata_discovery is None:\n if synchronous_metadata_discovery is None:\n
if system_preference is not None:\n
# not specified, fallback to site system preference configuration\n # not specified, fallback to site system preference configuration\n
synchronous_metadata_discovery = system_preference.isPreferredSynchronousMetadataDiscovery()\n synchronous_metadata_discovery = system_preference.isPreferredSynchronousMetadataDiscovery()\n
else:\n
synchronous_metadata_discovery = False\n
\n \n
if redirect_to_document is None:\n if redirect_to_document is None:\n
if system_preference is not None:\n
redirect_to_document = system_preference.isPreferredRedirectToDocument()\n redirect_to_document = system_preference.isPreferredRedirectToDocument()\n
else:\n
redirect_to_document = False\n
\n \n
document_kw = {}\n document_kw = {}\n
if use_context_for_container:\n if use_context_for_container:\n
...@@ -191,6 +197,7 @@ return document\n ...@@ -191,6 +197,7 @@ return document\n
<string>portal</string> <string>portal</string>
<string>portal_contributions</string> <string>portal_contributions</string>
<string>system_preference</string> <string>system_preference</string>
<string>False</string>
<string>document_kw</string> <string>document_kw</string>
<string>_write_</string> <string>_write_</string>
<string>_apply_</string> <string>_apply_</string>
...@@ -198,7 +205,6 @@ return document\n ...@@ -198,7 +205,6 @@ return document\n
<string>message</string> <string>message</string>
<string>getattr</string> <string>getattr</string>
<string>file_name</string> <string>file_name</string>
<string>False</string>
<string>is_existing_document_updated</string> <string>is_existing_document_updated</string>
<string>merged_document</string> <string>merged_document</string>
<string>document_edit_kw</string> <string>document_edit_kw</string>
......
72 73
\ 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