mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 15:14:47 +02:00
Fix checking if verification needed
This commit is contained in:
parent
d3287fd73f
commit
69562ec2a2
1 changed files with 10 additions and 1 deletions
|
@ -495,7 +495,7 @@ class Epp::Domain < Domain
|
||||||
registrant_verification_needed = false
|
registrant_verification_needed = false
|
||||||
# registrant block may not be present, so we need this to rule out false positives
|
# registrant block may not be present, so we need this to rule out false positives
|
||||||
if frame.css('registrant').text.present?
|
if frame.css('registrant').text.present?
|
||||||
registrant_verification_needed = (registrant.code != frame.css('registrant').text)
|
registrant_verification_needed = verification_needed?(code: frame.css('registrant').text)
|
||||||
end
|
end
|
||||||
|
|
||||||
if registrant_verification_needed && disputed?
|
if registrant_verification_needed && disputed?
|
||||||
|
@ -798,4 +798,13 @@ class Epp::Domain < Domain
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def verification_needed?(code:)
|
||||||
|
new_registrant = Registrant.find_by(code: code)
|
||||||
|
return false if new_registrant.try(:identical_to?, registrant)
|
||||||
|
|
||||||
|
registrant.code != code
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue