Commit 22095c04 authored by Vincent Pelletier's avatar Vincent Pelletier

Make "PARENTS is not defined in REQUEST" log a warning to avoid flooding unit test log.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19488 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 714d2222
......@@ -54,6 +54,7 @@ from ZODB.POSException import ConflictError
from Products.MailHost.MailHost import MailHostError
from zLOG import LOG, INFO, WARNING, ERROR
from warnings import warn
try:
from Products.TimerService import getTimerService
......@@ -799,7 +800,7 @@ class ActivityTool (Folder, UniqueObject):
# runing unit tests. Recreate it if it does not exist.
parents = getattr(request, 'PARENTS', None)
if parents is None:
LOG('CMFActivity.ActivityTool.invoke', INFO, 'PARENTS is not defined in REQUEST. It should only happen in unit tests.')
warn('CMFActivity.ActivityTool.invoke: PARENTS is not defined in REQUEST. It should only happen in unit tests.')
request['PARENTS'] = self.aq_chain[:]
new_request_container = request_container.__class__(REQUEST=request.clone())
# Recreate acquisition chain.
......
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