def alert_context(event): context = okta_alert_context(event) context["old_city"] = deep_get(EVENT_CITY_TRACKING.get( event.get("p_row_id")), "old_city", default="<NOT_STORED>") context["new_city"] = deep_get(EVENT_CITY_TRACKING.get( event.get("p_row_id")), "new_city", default="<UNKNOWN_NEW_CITY>") return context
def alert_context(event): context = okta_alert_context(event) context['old_city'] = EVENT_CITY_TRACKING[event['p_row_id']].get( 'old_city', '<NOT_STORED>') context['new_city'] = EVENT_CITY_TRACKING[event['p_row_id']]['new_city'] return context
def alert_context(event): return okta_alert_context(event)