Commit 59e75401 authored by Jérome Perrin's avatar Jérome Perrin

If function or funding are not a category, interpret them as function_uid / funding_uid

parent 1972507f
......@@ -109,14 +109,24 @@ funding_category = request.get(\'funding\')\n
if funding_category:\n
if funding_category == \'None\':\n
params[\'funding_uid\'] = Query(funding_uid=None)\n
else:\n
funding_value = portal.restrictedTraverse(funding_category, None)\n
if funding_value is not None and funding_value.getPortalType() != \'Category\':\n
params[\'funding_uid\'] = funding_value.getUid()\n
else:\n
params[\'funding_category\'] = funding_category\n
\n
function_category = request.get(\'function\')\n
if function_category:\n
if function_category == \'None\':\n
params[\'function_uid\'] = Query(function_uid=None)\n
else:\n
function_value = portal.restrictedTraverse(function_category, None)\n
if function_value is not None and function_value.getPortalType() != \'Category\':\n
params[\'function_uid\'] = function_value.getUid()\n
else:\n
params[\'function_category\'] = function_category\n
\n
if mirror_section:\n
mirror_section_uid = portal.restrictedTraverse(mirror_section).getUid()\n
params[\'mirror_section_uid\'] = mirror_section_uid\n
......
1501
1502
\ 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