bugfix: added missing join table (#541)

This commit is contained in:
Timo Göllner 2016-12-14 03:13:30 +01:00 committed by Martin Edenhofer
parent f9c1040930
commit 5a3f8c1bb6

View file

@ -164,8 +164,9 @@ returns
.order('tickets.created_at DESC')
.limit(limit)
else
query_condition, bind_condition = selector2sql(condition)
query_condition, bind_condition, tables = selector2sql(condition)
tickets_all = Ticket.select('DISTINCT(tickets.id), tickets.created_at')
.from("tickets#{tables}")
.where(access_condition)
.where(query_condition, *bind_condition)
.order('tickets.created_at DESC')