diff --git a/app/models/contact.rb b/app/models/contact.rb index 3d5db652c..a5d558c98 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -148,10 +148,10 @@ class Contact < ActiveRecord::Base end # rubocop:enable Metrics/CyclomaticComplexity - # used only for contact trasphere + # used only for contact transfer def generate_new_code! return nil if registrar.blank? - registrar.reload # for contact transfere + registrar.reload # for contact transfer self[:code] = "#{registrar.code}:#{SecureRandom.hex(4)}".upcase end diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index e6430dc5f..3f054003b 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -467,6 +467,7 @@ class Epp::Domain < Domain oc = c.deep_clone include: [:statuses] oc.code = nil oc.registrar_id = registrar_id + oc.prefix_code oc.save!(validate: false) oc end