Commit 0058eaa7 authored by Jérome Perrin's avatar Jérome Perrin

Base_getSectionUidListForSectionCategory : returns [-1] if no organisations...

Base_getSectionUidListForSectionCategory : returns [-1] if no organisations are member of this section_category.

This way we can directly pass the returned value as section_uid= to
getInventory without worrying about the problem that if this section category
has no member, then section_uid parameter is ignored.
parent 72815e7a
......@@ -55,14 +55,15 @@
This will only return organisations member of this section category.\n
If \'strict_membership\' is true, then only organisations strictly member\n
of the category will be returned.\n
If no organisations are member of this section category, then [-1] is returned.\n
"""\n
portal = context.getPortalObject()\n
\n
section = portal.portal_categories.restrictedTraverse(section_category)\n
return [x.getUid() for x in\n
return [x.uid for x in\n
section.getGroupRelatedValueList(portal_type=\'Organisation\',\n
strict_membership=strict_membership,\n
checked_permission=\'View\')]\n
checked_permission=\'View\')] or [-1]\n
</string> </value>
</item>
<item>
......
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