mirror of
https://github.com/internetee/registry.git
synced 2025-08-11 03:59:33 +02:00
commit
fix: improve company register status messages - Update error message for missing company in registry - Clarify status message format for existing companies - Update dependencies: logger (1.6.5) and net-smtp (0.5.1) The changes make company status messages more descriptive and clearer for administrators when a company's registration status triggers domain deletion. Messages now explicitly state whether a contact was not found or has a specific status in the business registry.
This commit is contained in:
parent
41ad6c6b21
commit
f61baf32c5
2 changed files with 8 additions and 4 deletions
|
@ -304,7 +304,7 @@ GEM
|
||||||
kaminari-core (= 1.2.1)
|
kaminari-core (= 1.2.1)
|
||||||
kaminari-core (1.2.1)
|
kaminari-core (1.2.1)
|
||||||
libxml-ruby (3.2.1)
|
libxml-ruby (3.2.1)
|
||||||
logger (1.6.4)
|
logger (1.6.5)
|
||||||
loofah (2.24.0)
|
loofah (2.24.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.12.0)
|
nokogiri (>= 1.12.0)
|
||||||
|
@ -349,7 +349,7 @@ GEM
|
||||||
net-protocol
|
net-protocol
|
||||||
net-protocol (0.2.2)
|
net-protocol (0.2.2)
|
||||||
timeout
|
timeout
|
||||||
net-smtp (0.5.0)
|
net-smtp (0.5.1)
|
||||||
net-protocol
|
net-protocol
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
newrelic-infinite_tracing (8.1.0)
|
newrelic-infinite_tracing (8.1.0)
|
||||||
|
|
|
@ -75,14 +75,18 @@ class CompanyRegisterStatusJob < ApplicationJob
|
||||||
contact.registrant_domains.each do |domain|
|
contact.registrant_domains.each do |domain|
|
||||||
next if domain.force_delete_scheduled?
|
next if domain.force_delete_scheduled?
|
||||||
|
|
||||||
company_status = company_status.nil? ? 'No information' : REGISTRY_STATUSES[company_status]
|
company_status = if company_status.nil?
|
||||||
|
'Contact not found in EE business registry'
|
||||||
|
else
|
||||||
|
"Contact has status #{REGISTRY_STATUSES[company_status]}"
|
||||||
|
end
|
||||||
|
|
||||||
domain.schedule_force_delete(
|
domain.schedule_force_delete(
|
||||||
type: :fast_track,
|
type: :fast_track,
|
||||||
notify_by_email: true,
|
notify_by_email: true,
|
||||||
reason: 'invalid_company',
|
reason: 'invalid_company',
|
||||||
email: contact.email,
|
email: contact.email,
|
||||||
notes: "Contact has status #{company_status}"
|
notes: company_status
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue