<commit_before>class User < ActiveRecord::Base
  include Clearance::User
  
  attr_accessible :email, :password, :can_download, :can_edit_activity, :can_edit_event, :can_see_legend, :can_see_description
  
  def destroy
    raise 'Must be at least one admin' if User.where(:is_admin => true).count == 1
    
    super.destroy
  end
end<commit_msg>fix check presence of one admin<commit_after>class User < ActiveRecord::Base
  include Clearance::User
  
  attr_accessible :email, :password, :can_download, :can_edit_activity, :can_edit_event, :can_see_legend, :can_see_description
  
  def destroy
    raise 'Must be at least one admin' unless User.where(:is_admin => true).count > 1
    
    super.destroy
  end
end
{'fraction_non_alphanumeric': 0.09090909090909091, 'fraction_numerical': 0.002797202797202797, 'mean_word_length': 4.59375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3554342', 'n_tokens_mistral': 232, 'n_tokens_neox': 225, 'n_words': 62}