# HG changeset patch # User Thierry Florac # Date 1511686450 -3600 # Node ID 1a27b43375d6c922f973e77573990960cbe8b458 # Parent e10f82e4874e071dc06371e410894d5cc8e87321 Added checks on restrictions diff -r e10f82e4874e -r 1a27b43375d6 src/pyams_content/shared/common/zmi/security.py --- a/src/pyams_content/shared/common/zmi/security.py Sun Nov 26 09:53:31 2017 +0100 +++ b/src/pyams_content/shared/common/zmi/security.py Sun Nov 26 09:54:10 2017 +0100 @@ -115,7 +115,7 @@ def getValue(self, obj): restrictions = IManagerRestrictions(self.context).get_restrictions(obj) - if restrictions.restricted_contents: + if (restrictions is not None) and restrictions.restricted_contents: return '' else: return '--' @@ -132,7 +132,7 @@ def getValue(self, obj): restrictions = IManagerRestrictions(self.context).get_restrictions(obj) - if restrictions.restricted_contents and restrictions.owners: + if (restrictions is not None) and restrictions.restricted_contents and restrictions.owners: return '' else: return '--'