Update users selection for notifications [SCI-6110] (#3573)

This commit is contained in:
aignatov-bio 2021-10-04 15:43:28 +02:00 committed by GitHub
parent 982aaf887c
commit 116c09cd8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ module GenerateNotificationModel
when Project
users = subject.users
when Experiment
users = subject.project.users
users = subject.users
when MyModule
users = subject.users
# Also send to the user that was unassigned,

View file

@ -56,7 +56,7 @@ class MyModule < ApplicationRecord
has_many :repository_rows, through: :my_module_repository_rows
has_many :repository_snapshots, dependent: :destroy, inverse_of: :my_module
has_many :user_my_modules, inverse_of: :my_module, dependent: :destroy
has_many :users, through: :user_my_modules
has_many :users, through: :user_assignments
has_many :report_elements, inverse_of: :my_module, dependent: :destroy
has_many :protocols, inverse_of: :my_module, dependent: :destroy
# Associations for old activity type