Commit b9a2b0e0 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: No need to call accessor on the catalog brain

This may sabe a bit of miliseconds per call.
parent 246aece9
from zExceptions import Unauthorized from zExceptions import Unauthorized
from AccessControl import getSecurityManager
if REQUEST is None: if REQUEST is None:
raise Unauthorized raise Unauthorized
...@@ -36,7 +35,7 @@ for sql_obj in context.getPortalObject().portal_catalog( ...@@ -36,7 +35,7 @@ for sql_obj in context.getPortalObject().portal_catalog(
obj = sql_obj.getObject() obj = sql_obj.getObject()
result_dict['_links']['content'].append({ result_dict['_links']['content'].append({
'href': '%s/ERP5Document_getHateoas' % obj.absolute_url(), 'href': '%s/ERP5Document_getHateoas' % obj.absolute_url(),
'title': obj.getTitle(), 'title': sql_obj.title,
}) })
response.setHeader('Content-Type', mime_type) response.setHeader('Content-Type', mime_type)
......
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