def get_calendar(intent_message, default_calendar):
    """
    Get the calendar from an intent.

    This returns the default calendar if the intent doesn't have a calendar.

    Parameter intent_message: the intent message
    Parameter default_calendar: the default calendar
    """

    # The user has specified a calendar file in his voice command
    if intent_message.slots and intent_message.slots.calendar_file:
        calendar = str(intent_message.slots.calendar_file.first().value)
    else:
        # The user has specified a default calendar file in the
        # default_calendar parameter
        if default_calendar:
            calendar = default_calendar
        else:
            calendar = ""

    return calendar