mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Do not overwrite auth info on domain create #2833
This commit is contained in:
parent
a447c8653c
commit
eff8dd5d7a
3 changed files with 8 additions and 5 deletions
|
@ -528,8 +528,13 @@ class Domain < ActiveRecord::Base
|
|||
Registrant.find_by(id: pending_json['domain']['registrant_id'].last)
|
||||
end
|
||||
|
||||
# rubocop:disable Lint/Loop
|
||||
def generate_auth_info
|
||||
return if auth_info.present?
|
||||
generate_auth_info!
|
||||
end
|
||||
|
||||
# rubocop:disable Lint/Loop
|
||||
def generate_auth_info!
|
||||
begin
|
||||
self.auth_info = SecureRandom.hex
|
||||
end while self.class.exists?(auth_info: auth_info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue