Don't use widgets prefix:because "principal_id" is used before "updateWidgets()" method call
authorThierry Florac <thierry.florac@onf.fr>
Thu, 12 Apr 2018 17:45:09 +0200
changeset 530 8e6fcde3cb95
parent 529 5bd7496f674f
child 531 288ab38cdb56
Don't use widgets prefix:because "principal_id" is used before "updateWidgets()" method call
src/pyams_content/shared/common/zmi/security.py
--- a/src/pyams_content/shared/common/zmi/security.py	Thu Apr 12 16:42:57 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/security.py	Thu Apr 12 17:45:09 2018 +0200
@@ -191,7 +191,7 @@
     @cached_property
     def principal_id(self):
         principal_id = self.request.params.get('principal_id') or \
-                       self.request.params.get('{0}{1}principal_id'.format(self.prefix, self.widgets.prefix))
+                       self.request.params.get('{0}widgets.principal_id'.format(self.prefix))
         if not principal_id:
             raise NotFound
         return principal_id