mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Fix contact code prefix on transfer #2595
This commit is contained in:
parent
2132489026
commit
a7def0b7ae
2 changed files with 3 additions and 2 deletions
|
@ -148,10 +148,10 @@ class Contact < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
# rubocop:enable Metrics/CyclomaticComplexity
|
# rubocop:enable Metrics/CyclomaticComplexity
|
||||||
|
|
||||||
# used only for contact trasphere
|
# used only for contact transfer
|
||||||
def generate_new_code!
|
def generate_new_code!
|
||||||
return nil if registrar.blank?
|
return nil if registrar.blank?
|
||||||
registrar.reload # for contact transfere
|
registrar.reload # for contact transfer
|
||||||
self[:code] = "#{registrar.code}:#{SecureRandom.hex(4)}".upcase
|
self[:code] = "#{registrar.code}:#{SecureRandom.hex(4)}".upcase
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -467,6 +467,7 @@ class Epp::Domain < Domain
|
||||||
oc = c.deep_clone include: [:statuses]
|
oc = c.deep_clone include: [:statuses]
|
||||||
oc.code = nil
|
oc.code = nil
|
||||||
oc.registrar_id = registrar_id
|
oc.registrar_id = registrar_id
|
||||||
|
oc.prefix_code
|
||||||
oc.save!(validate: false)
|
oc.save!(validate: false)
|
||||||
oc
|
oc
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue