<commit_before># Loose coupling of people for sharing things inside the methodbox
class WorkGroup < ActiveRecord::Base
  # No project or institutions modelled at the moment
  # belongs_to :institution
  # belongs_to :project
  has_many :group_memberships
  has_many :people, :through=>:group_memberships
  
  
  def destroy
    if people.empty?
        super
    else
      raise Exception.new("Cannot delete with associated people. This WorkGroup has "+people.size.to_s+" people associated with it")
    end
  end
  
  def description
    description
  end
  
end<commit_msg>group owned by a user<commit_after># Loose coupling of people for sharing things inside the methodbox
class WorkGroup < ActiveRecord::Base
  # No project or institutions modelled at the moment
  # belongs_to :institution
  # belongs_to :project
  
  belongs_to :user
  has_many :group_memberships
  has_many :people, :through=>:group_memberships
  
  
  def destroy
    if people.empty?
        super
    else
      raise Exception.new("Cannot delete with associated people. This WorkGroup has "+people.size.to_s+" people associated with it")
    end
  end
  
  def description
    info
  end
  
end
{'fraction_non_alphanumeric': 0.05702127659574468, 'fraction_numerical': 0.0, 'mean_word_length': 3.4545454545454546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2868152', 'n_tokens_mistral': 336, 'n_tokens_neox': 330, 'n_words': 121}