示例#1
0
 def _get_notify_field(self, payload):
     on_complete = NotificationSubSchema()
     route = (getattr(payload, 'notification_route', None)
              or getattr(payload, 'notification_channel', None))
     on_complete.routes = [route]
     on_complete.data = {
         'user': payload.user,
         'source_channel': payload.source_channel
     }
     notify = NotificationSchema()
     notify.on_complete = on_complete
     return notify
示例#2
0
 def _get_notify_field(self, payload):
     on_complete = NotificationSubSchema()
     route = (getattr(payload, 'notification_route', None) or
              getattr(payload, 'notification_channel', None))
     on_complete.routes = [route]
     on_complete.data = {
         'user': payload.user,
         'source_channel': payload.source_channel
     }
     notify = NotificationSchema()
     notify.on_complete = on_complete
     return notify
示例#3
0
 def _get_notify_field(self, payload):
     on_complete = NotificationSubSchema()
     route = getattr(payload, "notification_route", None) or getattr(
         payload, "notification_channel", None)
     on_complete.routes = [route]
     on_complete.data = {
         "user": payload.user,
         "source_channel": payload.source_channel,
         "source_context": getattr(payload, "source_context", None),
     }
     notify = NotificationSchema()
     notify.on_complete = on_complete
     return notify