<commit_before>class WebhooksController < ApplicationController
  def mailchimp
    user = User.find_by(email: params[:data][:email])

    if user
      user.update_column(is_subscribed: false)
    end

    render nothing: true
  end
end<commit_msg>Add extra if statement so mailchimp doesn't get pissed off.<commit_after>class WebhooksController < ApplicationController
  def mailchimp
    if params[:data] && params[:data][:email]
      user = User.find_by(email: params[:data][:email])

      if user
        user.update_column(is_subscribed: false)
      end
    end

    render nothing: true
  end
end
{'fraction_non_alphanumeric': 0.08745874587458746, 'fraction_numerical': 0.0, 'mean_word_length': 3.669230769230769, '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': '6630977', 'n_tokens_mistral': 183, 'n_tokens_neox': 178, 'n_words': 48}