def get_race_card_from_event_id(con, event_id):
    """
    Gets the race card given an event id
    :param con:
    :param event_id:
    :return:
    """

    query_race_card = f"""SELECT race_card FROM races as r JOIN events_im AS e ON r.race_link = e.race_link
                        WHERE event_id = '{event_id}'"""

    with con.cursor() as cursor:
        cursor.execute(query_race_card)
        race_card = cursor.fetchone().get('race_card')

    return race_card