Changed transition attribute name for notified roles
authorThierry Florac <thierry.florac@onf.fr>
Fri, 24 Jun 2016 16:25:25 +0200
changeset 3 1ccb516d65a3
parent 2 5e3445ae73be
child 4 9698e6853781
Changed transition attribute name for notified roles
src/pyams_notify/handlers/workflow.py
--- a/src/pyams_notify/handlers/workflow.py	Thu Jun 02 15:59:13 2016 +0200
+++ b/src/pyams_notify/handlers/workflow.py	Fri Jun 24 16:25:25 2016 +0200
@@ -37,7 +37,7 @@
     if request is None:
         return
     transition = event.transition
-    if transition.user_data.get('notify') is None:
+    if transition.user_data.get('notify_roles') is None:
         return
     translate = request.localizer.translate
     notification = Notification(request=request,
@@ -55,7 +55,7 @@
     """Content workflow transition notification handler"""
 
     def get_target(self):
-        notified_roles = self.context.user_data['transition'].user_data['notify']
+        notified_roles = self.context.user_data['transition'].user_data['notify_roles']
         if '*' in notified_roles:
             return {}
         principals = set()