Commit 70858698 authored by Romain Courteaud's avatar Romain Courteaud

erp5_discussion: only the first element is needed

parent afac180a
""" """
Get last Disccussion Post for a Discussion Thread. Get last Disccussion Post for a Discussion Thread.
""" """
post_list = context.searchFolder(portal_type='Discussion Post', \ post_list = context.searchFolder(portal_type='Discussion Post',
limit=1,
sort_on=[('creation_date','descending')]) sort_on=[('creation_date','descending')])
if len(post_list) == 0: if len(post_list) == 0:
return None return 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