mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-06 15:40:31 +08:00
Sanitize datatable params [SCI-8007]
This commit is contained in:
parent
e9bdd218fa
commit
ce3fbfe4eb
1 changed files with 1 additions and 4 deletions
|
@ -86,10 +86,7 @@ class ProtocolLinkedChildrenDatatable < CustomDatatable
|
|||
|
||||
def filter_child_records(records)
|
||||
if params[:version].present?
|
||||
version = params[:version]
|
||||
records = records.joins('LEFT JOIN protocols protocol_parents ' \
|
||||
'ON protocols.parent_id = protocol_parents.id ')
|
||||
.where('protocol_parents.version_number = #{version}')
|
||||
records = records.left_outer_joins(:parent).where(parent: { version_number: params[:version] })
|
||||
end
|
||||
records
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue