Merge pull request #2746 from internetee/ident-of-nil-registrant-raise-the-error

add nil check for registrant in phone checker job
This commit is contained in:
Timo Võhmar 2025-02-03 10:51:47 +02:00 committed by GitHub
commit 9112a48dbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,6 +27,8 @@ class OrgRegistrantPhoneCheckerJob < ApplicationJob
def execute_single_checker(registrant_user_code)
registrant_user = Contact.where(ident_type: 'org', ident_country_code: 'EE').joins(:registrant_domains).find_by(code: registrant_user_code)
return if registrant_user.nil?
is_phone_number_matching = check_the_registrant_phone_number(registrant_user)
call_disclosure_action(is_phone_number_matching, registrant_user)