Commit 62df6c03 authored by Ivan Tyagov's avatar Ivan Tyagov

Prevent passing 'portal_type' twice.

Set it explicitly only if it's not contained in kw (for example as list method in a listbox field).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21496 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f6c3def2
...@@ -122,7 +122,8 @@ try:\n ...@@ -122,7 +122,8 @@ try:\n
current_section = context.getWebSectionValue()\n current_section = context.getWebSectionValue()\n
\n \n
# Build the list of parameters\n # Build the list of parameters\n
valid_portal_type_list = portal.getPortalDocumentTypeList()\n if not kw.has_key(\'portal_type\'):\n
kw[\'portal_type\'] = portal.getPortalDocumentTypeList()\n
\n \n
if language is None:\n if language is None:\n
language = portal.Localizer.get_selected_language()\n language = portal.Localizer.get_selected_language()\n
...@@ -137,8 +138,7 @@ try:\n ...@@ -137,8 +138,7 @@ try:\n
group_by = (\'reference\',)\n group_by = (\'reference\',)\n
\n \n
# Return the list of matching documents for the given states\n # Return the list of matching documents for the given states\n
return current_section.searchResults(portal_type=valid_portal_type_list,\n return current_section.searchResults(language=language,\n
language=language,\n
validation_state=validation_state,\n validation_state=validation_state,\n
sort_on=sort_on,\n sort_on=sort_on,\n
group_by=group_by,\n group_by=group_by,\n
...@@ -206,7 +206,7 @@ except Unauthorized:\n ...@@ -206,7 +206,7 @@ except Unauthorized:\n
<string>portal_catalog</string> <string>portal_catalog</string>
<string>context</string> <string>context</string>
<string>current_section</string> <string>current_section</string>
<string>valid_portal_type_list</string> <string>_write_</string>
<string>None</string> <string>None</string>
<string>_apply_</string> <string>_apply_</string>
</tuple> </tuple>
......
642 643
\ 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