<commit_before>class StudentsController < ApplicationController
  after_action :cors_set_headers, only: :index

  respond_to :json

  def index
    @students = User.with_role("student").includes(roles: :team).
      where("teams.season_id = ?", Season.current).
      references(:teams).uniq
    respond_with @students.as_json(json_params)
  end

  private<commit_msg>fix students_controller to return only teams which are sponsored or volunteer<commit_after>class StudentsController < ApplicationController
  after_action :cors_set_headers, only: :index

  respond_to :json

  def index
    @students = User.with_role("student").includes(roles: :team).
      where("teams.season_id = ? and teams.kind IS NOT NULL", Season.current).
      references(:teams).uniq
    respond_with @students.as_json(json_params)
  end

  private
{'fraction_non_alphanumeric': 0.09794437726723096, 'fraction_numerical': 0.0, 'mean_word_length': 4.63265306122449, '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': '2962575', 'n_tokens_mistral': 252, 'n_tokens_neox': 247, 'n_words': 56}