<commit_before>class Issue2029SipgateIntegrationEnable < ActiveRecord::Migration[5.1]
  def change

    # return if it's a new setup
    return if !Setting.find_by(name: 'system_init_done')

    return if Setting.get(name: 'sipgate_config').present?

    Setting.create_or_update(
      title: 'sipgate.io config',
      name: 'sipgate_config',
      area: 'Integration::Sipgate',
      description: 'Defines the sipgate.io config.',
      options: {},
      state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
      preferences: {
        prio: 2,
        permission: ['admin.integration'],
      },
      frontend: false,
    )

  end
end<commit_msg>Follow up for issue #2029 - fixed check if sipgate_config already is filled.<commit_after>class Issue2029SipgateIntegrationEnable < ActiveRecord::Migration[5.1]
  def change

    # return if it's a new setup
    return if !Setting.find_by(name: 'system_init_done')

    return if Setting.get('sipgate_config').present?

    Setting.create_or_update(
      title: 'sipgate.io config',
      name: 'sipgate_config',
      area: 'Integration::Sipgate',
      description: 'Defines the sipgate.io config.',
      options: {},
      state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
      preferences: {
        prio: 2,
        permission: ['admin.integration'],
      },
      frontend: false,
    )

  end
end
{'fraction_non_alphanumeric': 0.14123917388407728, 'fraction_numerical': 0.011992005329780146, 'mean_word_length': 3.149171270718232, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '6614410', 'n_tokens_mistral': 497, 'n_tokens_neox': 482, 'n_words': 105}