mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 20:19:05 +08:00
Add checks for archived projects and experiments
This commit is contained in:
parent
193c4974d2
commit
5ee406606a
1 changed files with 11 additions and 1 deletions
|
@ -42,7 +42,17 @@ module Dashboard
|
|||
subject_type = 'Protocol'
|
||||
AND (values #>> '{message_items, my_module, id}') :: BIGINT = my_modules_protocol.id
|
||||
AND my_modules_protocol.archived = 'false'
|
||||
").select('
|
||||
LEFT JOIN experiments my_modules_experiment ON
|
||||
my_modules_experiment.id = my_modules.experiment_id
|
||||
OR my_modules_experiment.id = my_modules_result.experiment_id
|
||||
OR my_modules_experiment.id = my_modules_protocol.experiment_id
|
||||
LEFT JOIN projects experiments_project ON
|
||||
experiments_project.id = my_modules_experiment.project_id
|
||||
OR experiments_project.id = experiments.project_id
|
||||
")
|
||||
.where("my_modules_experiment.archived != 'true' OR my_modules_experiment.archived IS NULL")
|
||||
.where("experiments_project.archived != 'true' OR experiments_project.archived IS NULL")
|
||||
.select('
|
||||
projects.name as project_name,
|
||||
experiments.name as experiment_name,
|
||||
my_modules.name as my_module_name,
|
||||
|
|
Loading…
Reference in a new issue