def send_notif_after_export(user, event_name, result):
 if ('__error' in result):
  send_notification(user=user, action=NOTIF_EVENT_EXPORT_FAIL, title=NOTIFS[NOTIF_EVENT_EXPORT_FAIL]['title'].format(event_name=event_name), message=NOTIFS[NOTIF_EVENT_EXPORT_FAIL]['message'].format(error_text=result['result']['message']))
 else:
  send_notification(user=user, action=NOTIF_EVENT_EXPORTED, title=NOTIFS[NOTIF_EVENT_EXPORTED]['title'].format(event_name=event_name), message=NOTIFS[NOTIF_EVENT_EXPORTED]['message'].format(event_name=event_name, download_url=result['download_url']))

def send_notif_after_export ( user , event_name , result ) : if ( '__error' in result ) : send_notification ( user = user , action = NOTIF_EVENT_EXPORT_FAIL , title = NOTIFS [ NOTIF_EVENT_EXPORT_FAIL ] [ 'title' ] . format ( event_name = event_name ) , message = NOTIFS [ NOTIF_EVENT_EXPORT_FAIL ] [ 'message' ] . format ( error_text = result [ 'result' ] [ 'message' ] ) ) else : send_notification ( user = user , action = NOTIF_EVENT_EXPORTED , title = NOTIFS [ NOTIF_EVENT_EXPORTED ] [ 'title' ] . format ( event_name = event_name ) , message = NOTIFS [ NOTIF_EVENT_EXPORTED ] [ 'message' ] . format ( event_name = event_name , download_url = result [ 'download_url' ] ) )
send notification after event export .