Registrant API: Query representable and other contacts

This commit is contained in:
Karl Erik Õunapuu 2020-09-22 16:41:00 +03:00
parent 4f9fa88bd4
commit a67a0e5bf0
No known key found for this signature in database
GPG key ID: C9DD647298A34764
3 changed files with 5 additions and 5 deletions

View file

@ -210,11 +210,11 @@ class Contact < ApplicationRecord
)
end
def registrant_user_contacts(registrant_user, representment: true)
def registrant_user_contacts(registrant_user, representable: true)
represented_contacts = registrant_user_direct_contacts(registrant_user)
.or(registrant_user_company_contacts(registrant_user))
return represented_contacts if representment
return represented_contacts if representable
represented_contacts.or(registrant_user_indirect_contacts(registrant_user))
end