Skip to content

Incorrect table names in search joins #29

@camdendotlol

Description

@camdendotlol

When searching in NBU, the wrong table name seems to be injected into the SQL query at certain points. For example, POSTing a search to the Documents table throws this error:

2023-06-22T20:16:32.345523+00:00 app[web.1]: [b3aa046b-bdbc-4509-b864-62a81a6eec1d] ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  missing FROM-clause entry for table "people"
2023-06-22T20:16:32.345523+00:00 app[web.1]: LINE 1: ...OR documents.user_defined->>'Tags' ILIKE '%c%' OR people.use...
2023-06-22T20:16:32.345524+00:00 app[web.1]: ^
2023-06-22T20:16:32.345525+00:00 app[web.1]: ):

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions