def get_destination_from_obj(destination):
    """Helper to get a destination from a destination, event, or tour.

    For events and tours, return the first related destination, if any."""

    if hasattr(destination, 'first_destination'):
        # tour with related destination(s); use the ordered first
        return destination.first_destination
    else:
        # not an event or tour
        return destination