From 48b793d3100a481c1e6e24968a66fb10f1e27e2a Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Tue, 16 Nov 2021 16:58:08 +0200 Subject: [PATCH] HOTFIX: if no companies there, should return an empty array --- app/models/registrant_user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/registrant_user.rb b/app/models/registrant_user.rb index 74a8ad0e5..cec444ba6 100644 --- a/app/models/registrant_user.rb +++ b/app/models/registrant_user.rb @@ -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')