mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 19:51:01 +08:00
Update none of operator for assigned tasks [SCI-6572] (#3884)
Co-authored-by: Anton <anton@scinote.net>
This commit is contained in:
parent
e750295b07
commit
91ab7d0b40
1 changed files with 3 additions and 3 deletions
|
@ -335,9 +335,9 @@ class RepositoryDatatableService
|
|||
repository_rows.joins(:my_modules)
|
||||
.where(my_modules: { id: filter_element_params.dig(:parameters, :my_module_ids) })
|
||||
when 'none_of'
|
||||
repository_rows = repository_rows.left_outer_joins(:my_modules)
|
||||
repository_rows.where.not(my_modules: { id: filter_element_params.dig(:parameters, :my_module_ids) })
|
||||
.or(repository_rows.where(my_modules: { id: nil }))
|
||||
repository_rows.where('NOT EXISTS (SELECT NULL FROM my_module_repository_rows
|
||||
WHERE my_module_repository_rows.repository_row_id = repository_rows.id AND
|
||||
my_module_repository_rows.my_module_id IN (?))', filter_element_params.dig(:parameters, :my_module_ids))
|
||||
when 'all_of'
|
||||
repository_rows
|
||||
.joins(:my_modules)
|
||||
|
|
Loading…
Reference in a new issue