HOTFIX: if no companies there, should return an empty array

This commit is contained in:
olegphenomenon 2021-11-16 16:58:08 +02:00
parent 00bb2ffb45
commit 48b793d310

View file

@ -28,7 +28,7 @@ class RegistrantUser < User
end
def update_contacts_before_receive(companies)
return if companies.blank?
return [] if companies.blank?
companies.each do |company|
contacts = Contact.where(ident: company.registration_number, ident_country_code: 'EE')