plone.app.discussion/plone/app/discussion/contentrules.py
Alin Voinea 14d4382ca6 Use commented object as context instead of comment within event trigger
- In order this to work with plone.contentrules use commented object as
  the main context within custom discussion events and add comment as the
  second parameter.
2014-04-18 16:33:12 +03:00

11 lines
265 B
Python

""" Content rules handlers
"""
from Acquisition import aq_parent
from plone.app.contentrules.handlers import execute
from plone.stringinterp import adapters
def execute_comment(event):
""" Execute comment content rules
"""
execute(event.object, event)