mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Merge pull request #2271 from internetee/2216-update-fd-notes
Update FD notes when basis of the FD is changed
This commit is contained in:
commit
c232e8ade6
10 changed files with 139 additions and 143 deletions
|
@ -84,6 +84,7 @@ module Actions
|
|||
return false if @error
|
||||
|
||||
contact.generate_code
|
||||
contact.email_history = contact.email
|
||||
contact.save
|
||||
end
|
||||
end
|
||||
|
|
|
@ -112,6 +112,7 @@ module Actions
|
|||
|
||||
email_changed = contact.will_save_change_to_email?
|
||||
old_email = contact.email_was
|
||||
contact.email_history = old_email
|
||||
updated = contact.save
|
||||
|
||||
if updated && email_changed && contact.registrant?
|
||||
|
|
|
@ -23,11 +23,20 @@ module Domains
|
|||
def before_execute_force_delete(domain)
|
||||
if domain.force_delete_scheduled? && !domain.status_notes[DomainStatus::FORCE_DELETE].nil?
|
||||
added_additional_email_into_notes(domain)
|
||||
notify_registrar(domain)
|
||||
else
|
||||
process_force_delete(domain)
|
||||
end
|
||||
end
|
||||
|
||||
def notify_registrar(domain)
|
||||
domain.registrar.notifications.create!(text: I18n.t('force_delete_auto_email',
|
||||
domain_name: domain.name,
|
||||
outzone_date: domain.outzone_date,
|
||||
purge_date: domain.purge_date,
|
||||
email: domain.status_notes[DomainStatus::FORCE_DELETE]))
|
||||
end
|
||||
|
||||
def process_force_delete(domain)
|
||||
domain.schedule_force_delete(type: :soft,
|
||||
notify_by_email: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue