Add registrar poll message after updateing registrant contact(s) names

This commit is contained in:
Karl Erik Õunapuu 2020-11-03 16:14:01 +02:00
parent 89154c4fe2
commit 3444c4e021
No known key found for this signature in database
GPG key ID: C9DD647298A34764

View file

@ -58,7 +58,11 @@ class RegistrantUser < User
contacts = Contact.where(ident: ident, ident_country_code: country.alpha2)
.where('UPPER(name) != UPPER(?)', username)
contacts.each { |c| c.update(name: username) }
contacts.each do |contact|
contact.update(name: username)
action = actions.create!(contact: contact, operation: :update)
contact.registrar.notify(action)
end
end
class << self