--- a/src/pyams_notify/handlers/workflow.py Fri Jul 08 15:37:20 2016 +0200
+++ b/src/pyams_notify/handlers/workflow.py Fri Jul 08 15:37:51 2016 +0200
@@ -41,6 +41,7 @@
return
translate = request.localizer.translate
notification = Notification(request=request,
+ context=event.object,
action='notify',
category='content.workflow',
message=translate(transition.user_data['notify_message']).format(
@@ -64,6 +65,7 @@
protection = IProtectedObject(context, None)
if protection is not None:
principals |= protection.get_principals(role_id)
- if self.context.source['id'] in principals:
- principals.remove(self.context.source['id'])
+ source_id = self.context.source['id']
+ if source_id in principals:
+ principals.remove(source_id)
return {'principals': tuple(principals)}