From f5e0e811d9599532249a4f7827cfe5dd0e3f850b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Erik=20=C3=95unapuu?= Date: Tue, 3 Nov 2020 14:37:35 +0200 Subject: [PATCH] Revert "Update contact(s) name based on eIdentity data from Registrant API" This reverts commit 7a6568c34a17ce8778101b4222e64bd3ec267a3e. --- app/models/registrant_user.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/models/registrant_user.rb b/app/models/registrant_user.rb index 40f48f69c..c0addb5cd 100644 --- a/app/models/registrant_user.rb +++ b/app/models/registrant_user.rb @@ -2,7 +2,6 @@ class RegistrantUser < User attr_accessor :idc_data devise :trackable, :timeoutable - after_save :update_related_contacts def ability @ability ||= Ability.new(self) @@ -55,12 +54,6 @@ class RegistrantUser < User username.split.second end - def update_related_contacts - cc, idcode = registrant_ident.split('-') - contacts = Contact.where(ident: idcode, country_code: cc).where('name != ?', username) - contacts.each { |c| c.update(name: username) } - end - class << self def find_or_create_by_api_data(user_data = {}) return false unless user_data[:ident]