20220803153227_issue_4050_image_in_note.rb 419 B

12345678910111213
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue4050ImageInNote < ActiveRecord::Migration[6.1]
  3. def up
  4. return if !Setting.exists?(name: 'system_init_done')
  5. [User, Organization, Group].each do |klass|
  6. note_attr = ObjectManager::Attribute.for_object(klass).find_by(name: :note)
  7. note_attr.data_option[:no_images] = true
  8. note_attr.save!
  9. end
  10. end
  11. end