Merge pull request #8749 from artoscinote/ma_SCI_12204

Add team and user_group assignment relations [SCI-12204]
This commit is contained in:
Martin Artnik 2025-08-06 15:39:02 +02:00 committed by GitHub
commit d0e0fc7523
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -61,6 +61,7 @@ class Team < ApplicationRecord
has_many :shareable_links, inverse_of: :team, dependent: :destroy
has_many :storage_locations, dependent: :destroy
has_many :forms, dependent: :destroy
has_many :team_assignments, dependent: :destroy
attr_accessor :without_templates

View file

@ -14,6 +14,7 @@ class UserGroup < ApplicationRecord
belongs_to :last_modified_by, class_name: 'User', optional: true
has_many :user_group_memberships, dependent: :destroy
has_many :users, through: :user_group_memberships, dependent: :destroy
has_many :user_group_assignments, dependent: :destroy
accepts_nested_attributes_for :user_group_memberships