From b803a2fd9bec5c6868c258045a8b919648dcdb6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Evren=20Esat=20=C3=96zkan?= Date: Tue, 26 Jul 2016 11:14:28 +0300 Subject: [PATCH] fixed lane_change_invitation rref #5367 rref #5366 ref zetaops/zengine#66 ref zetaops/zengine#65 --- zengine/receivers.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/zengine/receivers.py b/zengine/receivers.py index 152e0394..db3262bb 100644 --- a/zengine/receivers.py +++ b/zengine/receivers.py @@ -11,14 +11,10 @@ 'set_password', ] - - - from pyoko.conf import settings from zengine.dispatch.dispatcher import receiver from zengine.signals import lane_user_change, crud_post_save - DEFAULT_LANE_CHANGE_INVITE_MSG = { 'title': settings.MESSAGES['lane_change_invite_title'], 'body': settings.MESSAGES['lane_change_invite_body'], @@ -48,11 +44,11 @@ def send_message_for_lane_change(sender, *args, **kwargs): for recipient in owners: if not isinstance(recipient, UserModel): recipient = recipient.get_user() - Notify(recipient.key).set_message(title=_(msg_context['title']), - msg=_(msg_context['body']), - typ=Notify.TaskInfo, - url=current.get_wf_link() - ) + recipient.send_notification(title=_(msg_context['title']), + message=_(msg_context['body']), + typ=Notify.TaskInfo, + url=current.get_wf_link() + ) # encrypting password on save