Commit 6dd3a2cc authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_hal_json_style: Do not call getRelativeUrl to just traverse it one call later

getRelativeUrl and restrictedTraverse are expensive operations. Do not
involve them pointlessly.
Also, boolean evaluation of lists is a thing.
parent 0057272c
......@@ -78,7 +78,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: (portal.Base_checkPermission(object.getRelativeUrl(), \'Add portal content\')) and (len(object.getVisibleAllowedContentTypeList()) != 0)</string> </value>
<value> <string>python: portal.portal_membership.checkPermission(\'Add portal content\', object) and object.getVisibleAllowedContentTypeList()</string> </value>
</item>
</dictionary>
</pickle>
......
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