mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +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)
|
repository_rows.joins(:my_modules)
|
||||||
.where(my_modules: { id: filter_element_params.dig(:parameters, :my_module_ids) })
|
.where(my_modules: { id: filter_element_params.dig(:parameters, :my_module_ids) })
|
||||||
when 'none_of'
|
when 'none_of'
|
||||||
repository_rows = repository_rows.left_outer_joins(:my_modules)
|
repository_rows.where('NOT EXISTS (SELECT NULL FROM my_module_repository_rows
|
||||||
repository_rows.where.not(my_modules: { id: filter_element_params.dig(:parameters, :my_module_ids) })
|
WHERE my_module_repository_rows.repository_row_id = repository_rows.id AND
|
||||||
.or(repository_rows.where(my_modules: { id: nil }))
|
my_module_repository_rows.my_module_id IN (?))', filter_element_params.dig(:parameters, :my_module_ids))
|
||||||
when 'all_of'
|
when 'all_of'
|
||||||
repository_rows
|
repository_rows
|
||||||
.joins(:my_modules)
|
.joins(:my_modules)
|
||||||
|
|
Loading…
Reference in a new issue