mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +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
|
||||
# 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue