[px] Better error reporting when encountering a parsing error in a PX.

This commit is contained in:
Gaetan Delannay 2013-06-26 17:06:06 +02:00
parent e4b84be05e
commit e6cacd10dd
4 changed files with 248 additions and 102 deletions

View file

@ -269,9 +269,9 @@ class ToolMixin(BaseMixin):
'''When must the portlet be shown?'''
# Not on 'edit' pages.
if layoutType == 'edit': return
if context.id == 'ui': context = context.getParentNode()
if context and (context.id == 'ui'): context = context.getParentNode()
res = True
if hasattr(context.aq_base, 'appy'):
if context and hasattr(context.aq_base, 'appy'):
appyObj = context.appy()
try:
res = appyObj.showPortlet()