diff --git a/product/ERP5Type/ERP5Type.py b/product/ERP5Type/ERP5Type.py index 89d4a938825a97404a967e3f45402943f7da7dba..56bc0370b70eba6a870d1cfa60f86461d286c196 100644 --- a/product/ERP5Type/ERP5Type.py +++ b/product/ERP5Type/ERP5Type.py @@ -227,15 +227,15 @@ class ERP5TypeInformation( FactoryTypeInformation, m = getattr(p, self.factory, None) - if m: + if m is not None: try: # validate() can either raise Unauthorized or return 0 to # mean unauthorized. permission = self.permission - if permission and _checkPermission( permission, container ): - return m + if permission and _checkPermission(permission, container): + return m elif getSecurityManager().validate(p, p, self.factory, m): - return m + return m except zExceptions_Unauthorized: # Catch *all* Unauths! pass