<commit_before>class LocalTransactionEdition < WholeEdition
  include Expectant

  referenced_in :lgsl,      class_name: "LocalTransactionsSource::Lgsl"

  field :lgsl_code,         type: String
  field :introduction,      type: String
  field :more_information,  type: String
 
  @fields_to_clone = [:introduction, :more_information, :minutes_to_complete, :expectation_ids]

  validates_presence_of :lgsl_code
  validates_presence_of :lgsl, :on => :create

  set_callback :validation, :before do |local_transaction|
    unless local_transaction.persisted? or lgsl_code.blank?
      local_transaction.lgsl = LocalTransactionsSource.find_current_lgsl(local_transaction.lgsl_code)
    end
  end

  def verify_snac(snac)
    lgsl.authorities.where(snac: snac).any?
  end
end
<commit_msg>We don't need to display quite as much info on the index page about LGSLs for local transactions<commit_after>class LocalTransactionEdition < WholeEdition
  include Expectant

  referenced_in :lgsl,      class_name: "LocalTransactionsSource::Lgsl"

  field :lgsl_code,         type: String
  field :introduction,      type: String
  field :more_information,  type: String
 
  @fields_to_clone = [:introduction, :more_information, :minutes_to_complete, :expectation_ids]
end

{'fraction_non_alphanumeric': 0.07472178060413355, 'fraction_numerical': 0.0, 'mean_word_length': 4.910798122065728, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '3210245', 'n_tokens_mistral': 410, 'n_tokens_neox': 387, 'n_words': 95}