def get_all_certs_attached_to_destination_without_autorotate(plugin_name=None):
    """
    Retrieves all certificates that are attached to a destination, but that do not have autorotate enabled.

    :param plugin_name: Optional destination plugin name to query. Queries certificates attached to any destination if not provided.
    :return: list of certificates attached to a destination without autorotate
    """
    if plugin_name:
        return (
            Certificate.query.filter(Certificate.destinations.any(plugin_name=plugin_name))
            .filter(Certificate.rotation == false())
            .filter(Certificate.revoked == false())
            .filter(Certificate.not_after >= arrow.now())
            .filter(not_(Certificate.replaced.any()))
            .all()  # noqa
        )

    return (
        Certificate.query.filter(Certificate.destinations.any())
        .filter(Certificate.rotation == false())
        .filter(Certificate.revoked == false())
        .filter(Certificate.not_after >= arrow.now())
        .filter(not_(Certificate.replaced.any()))
        .all()  # noqa
    )

    Retrieves all certificates that are attached to a destination, but that do not have autorotate enabled.

    :param plugin_name: Optional destination plugin name to query. Queries certificates attached to any destination if not provided.
    :return: list of certificates attached to a destination without autorotate
    
lemur/certificates/service.py