Commit 5176fff1 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_officejs_support_request, erp5_post: Do not use catalog API to resolve paths.

parent ba9a1418
follow_up_object, = context.getPortalObject().portal_catalog(relative_url=follow_up, limit=1) context.getPortalObject().restrictedTraverse(follow_up).edit() # update modification date
follow_up_object.edit() # update modification date
post = context.PostModule_createHTMLPostFromText( post = context.PostModule_createHTMLPostFromText(
follow_up=follow_up, follow_up=follow_up,
data=data, data=data,
......
...@@ -3,14 +3,10 @@ portal = context.getPortalObject() ...@@ -3,14 +3,10 @@ portal = context.getPortalObject()
# create an HTML Post # create an HTML Post
post_module = portal.post_module post_module = portal.post_module
# get the related object
follow_up_object, = portal.portal_catalog(relative_url=follow_up, limit=2)
follow_up_object = follow_up_object.getObject()
now = DateTime() now = DateTime()
post_edit_kw = { post_edit_kw = {
"start_date": now, "start_date": now,
"follow_up_value": follow_up_object, "follow_up_value": context.getPortalObject().restrictedTraverse(follow_up),
"text_content": data, "text_content": data,
} }
if predecessor is not None: if predecessor is not None:
......
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