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
current_section = context.getWebSectionValue()\n
\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
if language is None:\n
language = portal.Localizer.get_selected_language()\n
......@@ -137,8 +138,7 @@ try:\n
group_by = (\'reference\',)\n
\n
# Return the list of matching documents for the given states\n
return current_section.searchResults(portal_type=valid_portal_type_list,\n
language=language,\n
return current_section.searchResults(language=language,\n
validation_state=validation_state,\n
sort_on=sort_on,\n
group_by=group_by,\n
......@@ -206,7 +206,7 @@ except Unauthorized:\n
<string>portal_catalog</string>
<string>context</string>
<string>current_section</string>
<string>valid_portal_type_list</string>
<string>_write_</string>
<string>None</string>
<string>_apply_</string>
</tuple>
......
642
\ No newline at end of file
643
\ 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