diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /app/models/customer_relations/contact.rb | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) | |
download | gitlab-ce-d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb.tar.gz |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'app/models/customer_relations/contact.rb')
-rw-r--r-- | app/models/customer_relations/contact.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/customer_relations/contact.rb b/app/models/customer_relations/contact.rb index aaa7e2ae175..c632f8e2efa 100644 --- a/app/models/customer_relations/contact.rb +++ b/app/models/customer_relations/contact.rb @@ -5,8 +5,9 @@ class CustomerRelations::Contact < ApplicationRecord self.table_name = "customer_relations_contacts" - belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'group_id' + belongs_to :group, -> { where(type: Group.sti_name) }, foreign_key: 'group_id' belongs_to :organization, optional: true + has_and_belongs_to_many :issues, join_table: :issue_customer_relations_contacts # rubocop: disable Rails/HasAndBelongsToMany strip_attributes! :phone, :first_name, :last_name |