<commit_before>class Reports::ContributionReportsForProjectOwnersController < Reports::BaseController
  def index
    @report = end_of_association_chain.to_xls( columns: I18n.t('contribution_report_to_project_owner').values )
    super do |format|
      format.xls { send_data @report, filename: 'apoiadores.xls' }
    end
  end

  def end_of_association_chain
    conditions = { project_id: params[:project_id] }

    conditions.merge!(reward_id: params[:reward_id]) if params[:reward_id].present?
    conditions.merge!(state: (params[:state].present? ? params[:state] : 'confirmed'))
    conditions.merge!(project_owner_id: current_user.id) unless current_user.try(:admin)
    report_sql = ""
    I18n.t('contribution_report_to_project_owner').keys[0..-2].each{<commit_msg>Fix the contributions report on the project for channel admins<commit_after>class Reports::ContributionReportsForProjectOwnersController < Reports::BaseController
  def index
    @report = end_of_association_chain.to_xls( columns: I18n.t('contribution_report_to_project_owner').values )
    super do |format|
      format.xls { send_data @report, filename: 'apoiadores.xls' }
    end
  end

  def end_of_association_chain
    conditions = { project_id: params[:project_id] }

    conditions.merge!(reward_id: params[:reward_id]) if params[:reward_id].present?
    conditions.merge!(state: (params[:state].present? ? params[:state] : 'confirmed'))
    conditions.merge!(project_owner_id: current_user.id) unless (current_user.try(:admin) || (current_user.present? && channel.present? && channel.users.include?(current_user)))
    report_sql = ""
    I18n.t('contribution_report_to_project_owner').keys[0..-2].each{
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0071090047393364926, 'mean_word_length': 5.649606299212598, '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': '378564', 'n_tokens_mistral': 550, 'n_tokens_neox': 530, 'n_words': 87}