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)
follow_up_object.edit() # update modification date
context.getPortalObject().restrictedTraverse(follow_up).edit() # update modification date
post = context.PostModule_createHTMLPostFromText(
follow_up=follow_up,
data=data,
......
......@@ -3,14 +3,10 @@ portal = context.getPortalObject()
# create an HTML Post
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()
post_edit_kw = {
"start_date": now,
"follow_up_value": follow_up_object,
"follow_up_value": context.getPortalObject().restrictedTraverse(follow_up),
"text_content": data,
}
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