Commit 539919b9 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Catch Unauthorized. A bit better than only showing an exception.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15672 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6f205ca1
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
import sys import sys
from OFS.Traversable import NotFound from OFS.Traversable import NotFound
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo, Unauthorized
from Products.Formulator.DummyField import fields from Products.Formulator.DummyField import fields
from Products.Formulator import Widget, Validator from Products.Formulator import Widget, Validator
from Products.Formulator.Field import ZMIField from Products.Formulator.Field import ZMIField
...@@ -1888,7 +1888,7 @@ class ListBoxRendererLine: ...@@ -1888,7 +1888,7 @@ class ListBoxRendererLine:
except AttributeError: except AttributeError:
original_value = getattr(obj, property_id, None) original_value = getattr(obj, property_id, None)
processed_value = original_value processed_value = original_value
except (AttributeError, KeyError): except (AttributeError, KeyError, Unauthorized):
original_value = None original_value = None
processed_value = 'Could not evaluate %s' % property_id processed_value = 'Could not evaluate %s' % property_id
else: else:
......
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