def check_manager(obj, profile) -> bool:
    """
    Returns True if the user is a manager of the object or its parent Cast
    """
    # This first level is for getting objects to a potential cast relation
    for key in ("event",):
        if hasattr(obj, key):
            obj = getattr(obj, key)
            break
    if hasattr(obj, "cast"):
        obj = obj.cast
    return obj.is_manager(profile)