Commit cc349e74 authored by Jérome Perrin's avatar Jérome Perrin

budget consumption report: do not fail if empty items are selected

parent 66a86f47
......@@ -81,10 +81,10 @@ else:\n
validation_state=validation_state)\n
budget_type = request.get(\'budget_type\')\n
if budget_type:\n
search_kw[\'default_budget_type_uid\'] = [portal.portal_categories.budget_type.restrictedTraverse(x).getUid() for x in budget_type]\n
search_kw[\'default_budget_type_uid\'] = [portal.portal_categories.budget_type.restrictedTraverse(x).getUid() for x in budget_type if x]\n
specialise = request.get(\'specialise\')\n
if specialise:\n
search_kw[\'default_specialise_uid\'] = [portal.restrictedTraverse(x).getUid() for x in specialise]\n
search_kw[\'default_specialise_uid\'] = [portal.restrictedTraverse(x).getUid() for x in specialise if x]\n
\n
budget_list = portal.portal_catalog.searchResults(**search_kw)\n
group_filtered_budget_list = []\n
......
374
\ No newline at end of file
377
\ 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