mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Story#107821878 - pending_deleted gets new registrant_id too
This commit is contained in:
parent
44ae8fd350
commit
4fa286d0b0
3 changed files with 5 additions and 6 deletions
|
@ -106,8 +106,9 @@ class DomainMailer < ApplicationMailer
|
|||
name: @domain.name)} [#{@domain.name}]")
|
||||
end
|
||||
|
||||
def pending_deleted(domain_id, should_deliver)
|
||||
def pending_deleted(domain_id, old_registrant_id, should_deliver)
|
||||
@domain = Domain.find_by(id: domain_id)
|
||||
@old_registrant = Registrant.find(old_registrant_id)
|
||||
return unless @domain
|
||||
return if delivery_off?(@domain, should_deliver)
|
||||
|
||||
|
@ -121,8 +122,6 @@ class DomainMailer < ApplicationMailer
|
|||
return
|
||||
end
|
||||
|
||||
@old_registrant = Registrant.find(@domain.registrant_id_was)
|
||||
|
||||
confirm_path = "#{ENV['registrant_url']}/registrant/domain_delete_confirms"
|
||||
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
||||
|
||||
|
|
|
@ -490,7 +490,7 @@ class Domain < ActiveRecord::Base
|
|||
pending_delete_confirmation!
|
||||
save(validate: false) # should check if this did succeed
|
||||
|
||||
DomainMailer.pending_deleted(id, deliver_emails).deliver
|
||||
DomainMailer.pending_deleted(id, registrant_id_was, deliver_emails).deliver
|
||||
end
|
||||
|
||||
def pricelist(operation, period_i = nil, unit = nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue