<commit_before>class CorporateInformationPagesController < DocumentsController
  prepend_before_filter :find_organisation

  def show
    @corporate_information_page = @document

    if @organisation.is_a? WorldwideOrganisation
      render 'show_worldwide_organisation'
    else
      render :show
    end
  end

  def find_document_or_edition_for_public
    published_edition = @organisation.corporate_information_pages.published.for_slug!(params[:id])
    return published_edition if published_edition.available_in_locale?(I18n.locale)
  end

  def set_slimmer_headers_for_document
    set_slimmer_organisations_header([@organisation])<commit_msg>Don't error in controller when CIP not found.<commit_after>class CorporateInformationPagesController < DocumentsController
  prepend_before_filter :find_organisation

  def show
    @corporate_information_page = @document

    if @organisation.is_a? WorldwideOrganisation
      render 'show_worldwide_organisation'
    else
      render :show
    end
  end

  def find_document_or_edition_for_public
    published_edition = @organisation.corporate_information_pages.published.for_slug(params[:id])
    return published_edition if published_edition.present? && published_edition.available_in_locale?(I18n.locale)
  end

  def set_slimmer_headers_for_document
    set_slimmer_organisations_header([@organisation])
{'fraction_non_alphanumeric': 0.055106539309331376, 'fraction_numerical': 0.0029390154298310064, 'mean_word_length': 5.742574257425742, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6199469', 'n_tokens_mistral': 411, 'n_tokens_neox': 397, 'n_words': 69}